From fbe68a6e07cfa7574321b658b3a3e7c33062772f Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 29 Mar 2020 14:56:06 -0700 Subject: 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 --- mobile-widgets/qml/main.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 + } + } } -- cgit v1.2.3-70-g09d2