Skip to content

Commit c78b125

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 QuickSettings, Settings, or Launcher screens) we should just reload the Clock app directly.
1 parent 034d83f commit c78b125

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/displayapp/DisplayApp.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,10 @@ void DisplayApp::Refresh() {
246246
lcd.Sleep();
247247
PushMessageToSystemTask(Pinetime::System::Messages::OnDisplayTaskSleeping);
248248
state = States::Idle;
249+
// Since the active screen is not really an app, go back to Clock.
250+
if (currentApp == Apps::Launcher || currentApp == Apps::QuickSettings || currentApp == Apps::Settings) {
251+
LoadScreen(Apps::Clock, DisplayApp::FullRefreshDirections::None);
252+
}
249253
break;
250254
case Messages::GoToRunning:
251255
lcd.Wakeup();

0 commit comments

Comments
 (0)