From 503d8bd1fc3cd410af5d5292abddbf7a9719ff20 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 18 Aug 2021 18:17:58 -0700 Subject: mobile: don't quit on back button in Statistics mode Fixes #3192 Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/StatisticsPage.qml | 9 +++++++++ 1 file changed, 9 insertions(+) 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; + } } -- cgit v1.2.3-70-g09d2