aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/main.qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-29 14:56:06 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-30 09:16:55 -0700
commitfbe68a6e07cfa7574321b658b3a3e7c33062772f (patch)
treeea863af6baf0ca1e29ae85f4d61e194a57c3f5f8 /mobile-widgets/qml/main.qml
parentc233803d4f583f8982c5ecb3a3feb948afa5b97d (diff)
downloadsubsurface-fbe68a6e07cfa7574321b658b3a3e7c33062772f.tar.gz
mobile UI: don't exit when using back button to close drawers
An Android user might reasonably assume that they can use the back button to close the global or context drawers. So act accordingly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/main.qml')
-rw-r--r--mobile-widgets/qml/main.qml10
1 files changed, 10 insertions, 0 deletions
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml
index 5511f7385..1de83eb3f 100644
--- a/mobile-widgets/qml/main.qml
+++ b/mobile-widgets/qml/main.qml
@@ -880,4 +880,14 @@ if you have network connectivity and want to sync your data to cloud storage."),
manager.finishSetup()
manager.appInitialized()
}
+ onClosing: {
+ if (globalDrawer.visible) {
+ globalDrawer.close()
+ close.accepted = false
+ }
+ if (contextDrawer.visible) {
+ contextDrawer.close()
+ close.accepted = false
+ }
+ }
}