From de5a92fa652c69291c5739ea939a5a7dd0661d4f Mon Sep 17 00:00:00 2001 From: rrandomsky Date: Thu, 17 Aug 2023 15:32:29 +0200 Subject: [PATCH] [MOS-948] Fix for tethering popup was losing app context Fixed data loss when creating or editing a note/contact after connecting the USB cable and selecting the option to enable tetering in the popup window that appears. Now when tethering is enabled via the popup, the user will return to Application without data loss. --- module-apps/apps-common/popups/TetheringConfirmationPopup.cpp | 4 ++-- module-apps/apps-common/popups/TetheringOffPopup.cpp | 2 +- pure_changelog.md | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module-apps/apps-common/popups/TetheringConfirmationPopup.cpp b/module-apps/apps-common/popups/TetheringConfirmationPopup.cpp index 8d7c6431e0bb79ed28c32216cf179b9e0dd8dbb5..a619e96413ec7d55e0c4f5f3529b67656f1881fd 100644 --- a/module-apps/apps-common/popups/TetheringConfirmationPopup.cpp +++ b/module-apps/apps-common/popups/TetheringConfirmationPopup.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved. +// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include "TetheringConfirmationPopup.hpp" @@ -23,7 +23,7 @@ namespace gui metadata.action = [this]() { application->bus.sendUnicast(std::make_shared(), service::name::system_manager); - app::manager::Controller::sendAction(application, app::manager::actions::Home); + application->returnToPreviousWindow(); return true; }; auto msg = std::make_unique(std::move(metadata)); diff --git a/module-apps/apps-common/popups/TetheringOffPopup.cpp b/module-apps/apps-common/popups/TetheringOffPopup.cpp index c5659a49da5761a168e2b1e296e1c8947d34bbfd..387d52107c9885c1399d25a1a2ed42d43870c193 100644 --- a/module-apps/apps-common/popups/TetheringOffPopup.cpp +++ b/module-apps/apps-common/popups/TetheringOffPopup.cpp @@ -34,7 +34,7 @@ namespace gui metadata.action = [this]() { application->bus.sendUnicast(std::make_shared(sys::phone_modes::Tethering::Off), service::name::system_manager); - app::manager::Controller::sendAction(application, app::manager::actions::Home); + application->returnToPreviousWindow(); return true; }; metadata.title = utils::translate("tethering"); diff --git a/pure_changelog.md b/pure_changelog.md index 4e44535df76cb0f5db48b9ad5d905f638066e543..d7328c65da12ff72577261fa41a70868c5d04ab5 100644 --- a/pure_changelog.md +++ b/pure_changelog.md @@ -27,6 +27,7 @@ * Fixed ability to create contact with 2 same numbers * Fixed diacritics in translations * Fixed issues with file uploads with low disk space. +* Fixed data losing because switching tethering via tethering popup ## [1.7.2 2023-07-28]