summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/displayapp/DisplayApp.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp
index 74af01b3..69830ead 100644
--- a/src/displayapp/DisplayApp.cpp
+++ b/src/displayapp/DisplayApp.cpp
@@ -329,8 +329,13 @@ void DisplayApp::StartApp(Apps app, DisplayApp::FullRefreshDirections direction)
}
void DisplayApp::LoadNewScreen(Apps app, DisplayApp::FullRefreshDirections direction) {
- returnAppStack.Push(currentApp);
- appStackDirections.Push(direction);
+ // Don't add the same screen to the stack back to back.
+ // This is mainly to fix an issue with receiving two notifications at the same time
+ // and shouldn't happen otherwise.
+ if (app != currentApp) {
+ returnAppStack.Push(currentApp);
+ appStackDirections.Push(direction);
+ }
LoadScreen(app, direction);
}