Skip to content

Commit fb19c49

Browse files
Riksu9000JF002
authored andcommitted
Fix returning to the same screen
1 parent 5ef3c0d commit fb19c49

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/displayapp/DisplayApp.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,13 @@ void DisplayApp::StartApp(Apps app, DisplayApp::FullRefreshDirections direction)
329329
}
330330

331331
void DisplayApp::LoadNewScreen(Apps app, DisplayApp::FullRefreshDirections direction) {
332-
returnAppStack.Push(currentApp);
333-
appStackDirections.Push(direction);
332+
// Don't add the same screen to the stack back to back.
333+
// This is mainly to fix an issue with receiving two notifications at the same time
334+
// and shouldn't happen otherwise.
335+
if (app != currentApp) {
336+
returnAppStack.Push(currentApp);
337+
appStackDirections.Push(direction);
338+
}
334339
LoadScreen(app, direction);
335340
}
336341

0 commit comments

Comments
 (0)