Skip to content

Commit

Permalink
DisplayApp: Go to clock on sleep if no app loaded
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vkareh committed Aug 19, 2024
1 parent a3dbcd6 commit 4dd8a73
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/displayapp/DisplayApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,11 @@ void DisplayApp::Refresh() {
} else {
brightnessController.Set(Controllers::BrightnessController::Levels::Off);
lcd.Sleep();
// Since the active screen is not really an app, go back to Clock.
if (currentApp == Apps::Launcher || currentApp == Apps::Notifications || currentApp == Apps::QuickSettings ||
currentApp == Apps::Settings) {
LoadScreen(Apps::Clock, DisplayApp::FullRefreshDirections::None);
}
}
PushMessageToSystemTask(Pinetime::System::Messages::OnDisplayTaskSleeping);
state = States::Idle;
Expand Down

0 comments on commit 4dd8a73

Please sign in to comment.