Fix returning to the same screen
This commit is contained in:
parent
5ef3c0d3be
commit
fb19c491b6
1 changed files with 7 additions and 2 deletions
|
@ -329,8 +329,13 @@ void DisplayApp::StartApp(Apps app, DisplayApp::FullRefreshDirections direction)
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplayApp::LoadNewScreen(Apps app, DisplayApp::FullRefreshDirections direction) {
|
void DisplayApp::LoadNewScreen(Apps app, DisplayApp::FullRefreshDirections direction) {
|
||||||
returnAppStack.Push(currentApp);
|
// Don't add the same screen to the stack back to back.
|
||||||
appStackDirections.Push(direction);
|
// 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);
|
LoadScreen(app, direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue