diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2021-08-18 18:17:58 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-08-18 19:09:59 -0700 |
commit | 503d8bd1fc3cd410af5d5292abddbf7a9719ff20 (patch) | |
tree | 5efaa8b0c0081afa12ffb6be3b910cfeddda1aa2 | |
parent | 2c04a1f297ffed9d2d5d2365e0397e2e9c21c38e (diff) | |
download | subsurface-503d8bd1fc3cd410af5d5292abddbf7a9719ff20.tar.gz |
mobile: don't quit on back button in Statistics mode
Fixes #3192
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | mobile-widgets/qml/StatisticsPage.qml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mobile-widgets/qml/StatisticsPage.qml b/mobile-widgets/qml/StatisticsPage.qml index 0a9a7bdea..74ec8ef4d 100644 --- a/mobile-widgets/qml/StatisticsPage.qml +++ b/mobile-widgets/qml/StatisticsPage.qml @@ -232,4 +232,13 @@ Kirigami.Page { Component.onCompleted: { statsManager.init(statsView, chartListModel) } + onBackRequested: { + // if the menu drawer is open, the back button should close it + if (globalDrawer.visible) { + globalDrawer.close() + } else { + showDiveList() + } + event.accepted = true; + } } |