diff options
-rw-r--r-- | mobile-widgets/qml/DiveList.qml | 10 | ||||
-rw-r--r-- | mobile-widgets/qml/main.qml | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index 76e8a52f9..b8cb553c7 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -491,7 +491,15 @@ Kirigami.ScrollablePage { event.accepted = true; } if (!startPage.visible) { - if (Qt.platform.os != "ios") { + if (globalDrawer.visible) { + globalDrawer.close() + event.accepted = true + } + if (contextDrawer.visible) { + contextDrawer.close() + event.accepted = true + } + if (event.accepted === false && Qt.platform.os !== "ios") { manager.quit() } // let's make sure Kirigami doesn't quit on our behalf diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index 1de83eb3f..243978c46 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -881,6 +881,7 @@ if you have network connectivity and want to sync your data to cloud storage."), manager.appInitialized() } onClosing: { + // this duplicates the check that is already in the onBackRequested signal handler of the DiveList if (globalDrawer.visible) { globalDrawer.close() close.accepted = false |