Workaround to refresh timer loops on some configurations

Wed, 02 Feb 2022 11:46:05 +0200

author
Tuomo Valkonen <tuomov@iki.fi>
date
Wed, 02 Feb 2022 11:46:05 +0200
changeset 144
31227feaa05a
parent 143
61fcd6edb27f
child 145
2e8b9a3caa56

Workaround to refresh timer loops on some configurations

borgend/ui.py file | annotate | diff | comparison | revisions
--- a/borgend/ui.py	Wed Dec 15 10:35:17 2021 +0200
+++ b/borgend/ui.py	Wed Feb 02 11:46:05 2022 +0200
@@ -304,15 +304,15 @@
             logger.debug("set title %s" % title)
             self.title=title
 
-        if not self.updated_recently and not refresh_time:
-            self.refresh_timer.stop()
-        elif self.updated_recently:
+        self.refresh_timer.stop()
+        
+        if self.updated_recently:
             self.updated_recently=False
             if self.refresh_timer.interval>refresh_interval:
                 self.refresh_timer.stop()
                 self.refresh_timer.interval=refresh_interval
                 self.refresh_timer.start()
-        else:
+        elif refresh_time:
             # Need to time a refresh due to content display changing,
             # e.g., 'tomorrow' changing to a more specific hour.
             when=time.mktime(refresh_time.timetuple())

mercurial