Skip to content

Commit 5c4912f

Browse files
committed
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 034d83f commit 5c4912f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/displayapp/DisplayApp.cpp

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

0 commit comments

Comments
 (0)