mobile: don't quit on back button in Statistics mode

Fixes #3192

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2021-08-18 18:17:58 -07:00
parent 2c04a1f297
commit 503d8bd1fc

View file

@ -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;
}
}