Skip to content

Commit 1a00af1

Browse files
committedFeb 14, 2024
DisplayApp: Go to clock on sleep if no app loaded
When turning off the screen, if there is no actual app loaded (i.e. we are still in the Launcher, Notifications, QuickSettings, or Settings screens) we should just reload the Clock app directly.
1 parent 93d7da1 commit 1a00af1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/displayapp/DisplayApp.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@ void DisplayApp::Refresh() {
245245
vTaskDelay(100);
246246
}
247247
lcd.Sleep();
248+
// Since the active screen is not really an app, go back to Clock.
249+
if (currentApp == Apps::Launcher || currentApp == Apps::Notifications || currentApp == Apps::QuickSettings ||
250+
currentApp == Apps::Settings) {
251+
LoadScreen(Apps::Clock, DisplayApp::FullRefreshDirections::None);
252+
}
248253
PushMessageToSystemTask(Pinetime::System::Messages::OnDisplayTaskSleeping);
249254
state = States::Idle;
250255
break;

0 commit comments

Comments
 (0)