From 0a0366bb7474f15400948d9209cdc19274ab0e5d Mon Sep 17 00:00:00 2001 From: Piotr Tanski Date: Thu, 19 Nov 2020 09:21:54 +0100 Subject: [PATCH] [EGD-4267] Don't clean application windows if the application switch is not yet confirmed. (#1040) --- changelog.md | 1 + module-apps/Application.cpp | 10 +--------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/changelog.md b/changelog.md index d4b7e4b44..83b86b0c6 100644 --- a/changelog.md +++ b/changelog.md @@ -24,6 +24,7 @@ ### Fixed * `[desktop]` Absent call button on desktop with notifications fix +* `[desktop]` Fixed system freeze on pressing Back button while focused on desktop. * `[messages]` Fixed clearing text on options/recipient choice in new message window. * `[Text]` Fixed newline handling. * `[appmgr]` Fixed applications closing. diff --git a/module-apps/Application.cpp b/module-apps/Application.cpp index 8acb655af..926de89c5 100644 --- a/module-apps/Application.cpp +++ b/module-apps/Application.cpp @@ -178,10 +178,7 @@ namespace app void Application::returnToPreviousWindow(const uint32_t times) { - auto prevWindow = getPrevWindow(times); - if (prevWindow == gui::name::window::no_window) { - LOG_INFO("Back to previous application"); - cleanPrevWindw(); + if (const auto prevWindow = getPrevWindow(times); prevWindow == gui::name::window::no_window) { app::manager::Controller::switchBack(this); } else { @@ -676,11 +673,6 @@ namespace app return *std::prev(windowsStack.stack.end(), count + 1); } - void Application::Application::cleanPrevWindw() - { - this->windowsStack.stack.clear(); - } - gui::AppWindow *Application::getCurrentWindow() { if (windowsStack.stack.size() == 0) {