[gnome-software] trivial: Set the UI sensitity correctly when	updating a runtime from an app
- From: Richard Hughes <rhughes src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-software] trivial: Set the UI sensitity correctly when	updating a runtime from an app
 
- Date: Tue, 11 Sep 2018 12:56:53 +0000 (UTC)
 
commit fefc625e35cb346a2e38b976405ffb8034a24272
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]