Skip to content

Commit 8ce2cba

Browse files
committed
DisplayApp: Return to the clock when sleeping from a notification preview
When the display goes to sleep, DisplayApp returns to the clock face from every transient screen except the notification preview. A preview that has been tapped once has already cancelled its auto-close timer and released its wake lock, so it stays loaded across sleep and reappears on every wake until you navigate away from it manually. Add Apps::NotificationsPreview to the list of screens that are left behind on sleep, so a tapped preview is dismissed like every other transient screen.
1 parent 8d7a04e commit 8ce2cba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/displayapp/DisplayApp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ void DisplayApp::Refresh() {
320320
brightnessController.Set(Controllers::BrightnessController::Levels::Off);
321321
}
322322
// Since the active screen is not really an app, go back to Clock.
323-
if (currentApp == Apps::Launcher || currentApp == Apps::Notifications || currentApp == Apps::QuickSettings ||
324-
currentApp == Apps::Settings) {
323+
if (currentApp == Apps::Launcher || currentApp == Apps::Notifications || currentApp == Apps::NotificationsPreview ||
324+
currentApp == Apps::QuickSettings || currentApp == Apps::Settings) {
325325
LoadScreen(Apps::Clock, DisplayApp::FullRefreshDirections::None);
326326
// Wait for the clock app to load before moving on.
327327
while (!lv_task_handler()) {

0 commit comments

Comments
 (0)