[gnome-software/gnome-3-30] trivial: Set the UI sensitity correctly when updating a runtime from an app



commit ad1ea44d453b01643f4caa2c176ebc7f2834491d
Author: Richard Hughes <richard hughsie com>
Date:   Tue Sep 11 13:56:17 2018 +0100

    trivial: Set the UI sensitity correctly when updating a runtime from an app

 plugins/flatpak/gs-flatpak-transaction.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/plugins/flatpak/gs-flatpak-transaction.c b/plugins/flatpak/gs-flatpak-transaction.c
index dbc7af9c..d428c496 100644
--- a/plugins/flatpak/gs-flatpak-transaction.c
+++ b/plugins/flatpak/gs-flatpak-transaction.c
@@ -119,8 +119,14 @@ _transaction_ready (FlatpakTransaction *transaction)
                FlatpakTransactionOperation *op = l->data;
                const gchar *ref = flatpak_transaction_operation_get_ref (op);
                g_autoptr(GsApp) app = _ref_to_app (self, ref);
-               if (app != NULL)
+               if (app != NULL) {
                        _transaction_operation_set_app (op, app);
+                       /* if we're updating a component, then mark all the apps
+                        * involved to ensure updating the button state */
+                       if (flatpak_transaction_operation_get_operation_type (op) ==
+                                       FLATPAK_TRANSACTION_OPERATION_UPDATE)
+                               gs_app_set_state (app, AS_APP_STATE_INSTALLING);
+               }
        }
        return TRUE;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]