1
0
Fork 0

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 <daniel@redfelineninja.org.uk>
pull/111/head
Daniel Thompson 2020-11-22 09:27:14 +00:00
parent 748e5fe65a
commit bfa715b488
1 changed files with 2 additions and 1 deletions

View File

@ -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