[gnome-software/wip/mcrha/update-notifications] gs-plugin-loader: Reset online-updates-timestamp only when did the update



commit 9a48a04d180f9d3e988efe761cee7bfd9bea79dd
Author: Milan Crha <mcrha redhat com>
Date:   Fri Mar 5 13:34:40 2021 +0100

    gs-plugin-loader: Reset online-updates-timestamp only when did the update
    
    The gs_plugin_loader_generic_update() is used in two cases, when updating
    the software and when downloading the software. The former case can reset
    the online-updates-timestamp, but the later not, because it did not
    update anything.
    
    This blocks the update notifications from showing up after the first
    run of the Software.

 lib/gs-plugin-loader.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 2dad71f86..358cb8439 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -3124,7 +3124,9 @@ gs_plugin_loader_generic_update (GsPluginLoader *plugin_loader,
                gs_plugin_status_update (plugin, NULL, GS_PLUGIN_STATUS_FINISHED);
        }
 
-       gs_utils_set_online_updates_timestamp (plugin_loader->settings);
+       if (gs_plugin_job_get_action (helper->plugin_job) == GS_PLUGIN_ACTION_UPDATE)
+               gs_utils_set_online_updates_timestamp (plugin_loader->settings);
+
        return TRUE;
 }
 


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