[presto] update clock on wake up

This commit is contained in:
Claudio Ortolina
2026-05-07 08:24:58 +01:00
parent 32a47bda47
commit ed9556a479
2 changed files with 10 additions and 4 deletions
+9 -3
View File
@@ -469,7 +469,8 @@ def sleep_display():
def wake_display():
"""Restore the display backlight and reconnect WiFi if needed."""
"""Restore the display backlight, refresh the clock, reconnect WiFi if
needed, and redraw so the today-highlight stays current."""
global _display_awake
try:
@@ -478,9 +479,14 @@ def wake_display():
pass
_display_awake = True
# Refresh today's date from the system clock (may have crossed midnight).
set_today()
if not wifi_connected():
if ensure_wifi_connected():
redraw_current_view()
ensure_wifi_connected()
redraw_current_view()
def wifi_connected():