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>
This commit is contained in:
parent
748e5fe65a
commit
bfa715b488
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue