[gnome-shell/244-calendar-server-update-views-only-after-the-time-range-is-set] calendar-server: Update views only after the time range is set



commit a905dd3155b1f08a62ec707d501535567ab74de5
Author: Milan Crha <mcrha redhat com>
Date:   Wed May 2 15:24:57 2018 +0200

    calendar-server: Update views only after the time range is set
    
    The gnome-shell-calendar-server calls to refresh queries even when it has not
    time range set, which results in:
    a) waste of resources (for example after login),
    b) many runtime warnings in the journalctl log, related to incorrect time range being used.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/244

 src/calendar-server/gnome-shell-calendar-server.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/calendar-server/gnome-shell-calendar-server.c 
b/src/calendar-server/gnome-shell-calendar-server.c
index e979f7ff3..9b76fb073 100644
--- a/src/calendar-server/gnome-shell-calendar-server.c
+++ b/src/calendar-server/gnome-shell-calendar-server.c
@@ -590,6 +590,11 @@ app_load_events (App *app)
   g_list_free (app->live_views);
   app->live_views = NULL;
 
+  if (!app->since || !app->until)
+    {
+      print_debug ("Skipping load of events, no time interval set yet");
+      return;
+    }
   /* timezone could have changed */
   app_update_timezone (app);
 


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