From bfa715b488554671fe2cd1dbc3a99acd25a9d167 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Sun, 22 Nov 2020 09:27:14 +0000 Subject: [PATCH] widgets: clock: Improve the redraw logic Currently if we wake the watch exactly N hours (where N is integer) after it goes to sleep then the time will not be updated. Fix this the obvious way. Signed-off-by: Daniel Thompson --- wasp/widgets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wasp/widgets.py b/wasp/widgets.py index 7fc4988..f064c69 100644 --- a/wasp/widgets.py +++ b/wasp/widgets.py @@ -102,7 +102,8 @@ class Clock: if on_screen and on_screen == now: return None - if self.enabled and (not on_screen or now[4] != on_screen[4]): + if self.enabled and (not on_screen + or now[4] != on_screen[4] or now[3] != on_screen[3]): t1 = '{:02}:{:02}'.format(now[3], now[4]) draw = wasp.watch.drawable