[gnome-software/gnome-40: 1/4] gs-update-monitor: Pending updates not downloaded after 14 days waiting




commit eb1fe8769a38647adb65860d0b91610dc4d2524f
Author: Milan Crha <mcrha redhat com>
Date:   Mon May 17 13:04:49 2021 +0200

    gs-update-monitor: Pending updates not downloaded after 14 days waiting
    
    The pending updates should be auto-downloaded when there was nothing installed
    for 14 days, but the code had been checking 14 days since the last notification
    about the pending updates, which is done more often.
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1253

 src/gs-update-monitor.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
---
diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c
index 125d8040e..b3209185d 100644
--- a/src/gs-update-monitor.c
+++ b/src/gs-update-monitor.c
@@ -150,13 +150,6 @@ check_if_timestamp_more_than_days_ago (GsUpdateMonitor *monitor, const gchar *ti
        return timestamp_days >= days;
 }
 
-static gboolean
-no_notification_for_days (GsUpdateMonitor *monitor,
-                         guint days)
-{
-       return check_if_timestamp_more_than_days_ago (monitor, "update-notification-timestamp", days);
-}
-
 static gboolean
 should_download_updates (GsUpdateMonitor *monitor)
 {
@@ -518,7 +511,7 @@ get_updates_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
 
        if (should_download_updates (monitor) &&
            (security_timestamp_old != security_timestamp ||
-           no_notification_for_days (monitor, 14))) {
+           check_if_timestamp_more_than_days_ago (monitor, "install-timestamp", 14))) {
                g_autoptr(GsPluginJob) plugin_job = NULL;
 
                /* download any updates; individual plugins are responsible for deciding


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