[gnome-software] update monitor: Only show installed update notification once



commit b4b01e8a1ed56a391a83078c8dcbd51fc038fdf7
Author: Kalev Lember <kalevlember gmail com>
Date:   Thu Apr 10 23:46:44 2014 +0200

    update monitor: Only show installed update notification once
    
    We don't need to nag the user to review installed updates; if they
    choose to dismiss the notification, respect that and avoid reshowing it
    again at next login.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=728000

 src/gs-update-monitor.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c
index c308136..d2801db 100644
--- a/src/gs-update-monitor.c
+++ b/src/gs-update-monitor.c
@@ -178,14 +178,20 @@ static gboolean
 check_offline_update_cb (gpointer user_data)
 {
        GsUpdateMonitor *monitor = user_data;
+       guint64 time_last_notified;
        guint64 time_update_completed;
 
+       g_settings_get (monitor->settings,
+                       "install-timestamp", "x", &time_last_notified);
+
        if (gs_offline_updates_get_time_completed (&time_update_completed)) {
+               if (time_last_notified < time_update_completed)
+                       show_installed_updates_notification (monitor);
+
                g_settings_set (monitor->settings,
                                "install-timestamp", "x", time_update_completed);
        }
 
-       show_installed_updates_notification (monitor);
        start_monitoring_offline_updates (monitor);
 
         monitor->check_offline_update_id = 0;


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