Skip to content

Commit 4dd8a73

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 a3dbcd6 commit 4dd8a73

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
@@ -303,6 +303,11 @@ void DisplayApp::Refresh() {
303303
} else {
304304
brightnessController.Set(Controllers::BrightnessController::Levels::Off);
305305
lcd.Sleep();
306+
// Since the active screen is not really an app, go back to Clock.
307+
if (currentApp == Apps::Launcher || currentApp == Apps::Notifications || currentApp == Apps::QuickSettings ||
308+
currentApp == Apps::Settings) {
309+
LoadScreen(Apps::Clock, DisplayApp::FullRefreshDirections::None);
310+
}
306311
}
307312
PushMessageToSystemTask(Pinetime::System::Messages::OnDisplayTaskSleeping);
308313
state = States::Idle;

0 commit comments

Comments
 (0)