[gnome-software/wip/packagekit-claim-updates-changed] packagekit: Emit 'updates-changed' on refresh and update download



commit aeb1ed52f974f1839533e169c2916121c91d176d
Author: Milan Crha <mcrha redhat com>
Date:   Tue Mar 1 11:09:03 2022 +0100

    packagekit: Emit 'updates-changed' on refresh and update download
    
    Both the refresh and update download can change state of the prepared updates,
    thus emit the 'updates-changed' signal, to reflect the change in the UI.

 plugins/packagekit/gs-plugin-packagekit.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c
index 71b4d6553..618ccf9fd 100644
--- a/plugins/packagekit/gs-plugin-packagekit.c
+++ b/plugins/packagekit/gs-plugin-packagekit.c
@@ -3555,6 +3555,9 @@ gs_plugin_download (GsPlugin *plugin,
        if (!gs_metered_remove_from_download_scheduler (schedule_entry_handle, NULL, &error_local))
                g_warning ("Failed to remove schedule entry: %s", error_local->message);
 
+       if (retval)
+               gs_plugin_updates_changed (plugin);
+
        return retval;
 }
 
@@ -3588,6 +3591,8 @@ gs_plugin_refresh (GsPlugin *plugin,
                return FALSE;
        }
 
+       gs_plugin_updates_changed (plugin);
+
        return TRUE;
 }
 


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