diff options
author | Riku Isokoski <riksu9000@gmail.com> | 2022-12-11 14:33:51 +0200 |
---|---|---|
committer | JF <JF002@users.noreply.github.com> | 2023-01-05 15:13:05 +0100 |
commit | fb19c491b6f82dd3dfb2f031a1398ce4feb263a5 (patch) | |
tree | 94f5e2ffcd6943b6bee70ce2e2a18ce475113ec0 /src/displayapp | |
parent | 5ef3c0d3be58b6741a9e443e6d2151de2b3a59bc (diff) |
Fix returning to the same screen
Diffstat (limited to 'src/displayapp')
-rw-r--r-- | src/displayapp/DisplayApp.cpp | 9 |
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); } |