mod: fix clock bugs, add NTP auto-sync, show clock in all headers
- Fix SetTimeActivity immediately dismissing by changing wasReleased to wasPressed for all button inputs (matching other subactivities) - Extract NTP sync into shared TimeSync utility (startNtpSync, waitForNtpSync, stopNtpSync) and trigger non-blocking NTP sync on every WiFi connection - Move clock rendering into drawHeader (BaseTheme + LyraTheme) so it appears on all screens with a header, positioned symmetrically with the battery icon (12px margin, same Y offset, SMALL_FONT_ID) - Add per-minute auto-refresh on home screen so clock updates without button press - Add RTC time debug log on boot to verify time persistence across deep sleep Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -16,6 +16,7 @@ class HomeActivity final : public Activity {
|
||||
bool recentsLoaded = false;
|
||||
bool firstRenderDone = false;
|
||||
bool hasOpdsUrl = false;
|
||||
int lastRenderedMinute = -1; // Track displayed minute for clock auto-update
|
||||
bool coverRendered = false; // Track if cover has been rendered once
|
||||
bool coverBufferStored = false; // Track if cover buffer is stored
|
||||
uint8_t* coverBuffer = nullptr; // HomeActivity's own buffer for cover image
|
||||
|
||||
Reference in New Issue
Block a user