From cc319ad8b110beff1e53d1df020bdd153bcadcde Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 14 Apr 2018 20:32:40 -0700 Subject: [PATCH] QML UI: allow collapsing the open trip Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DiveList.qml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index 6a0e1ba7f..b120ef4d7 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -280,7 +280,10 @@ Kirigami.ScrollablePage { MouseArea { anchors.fill: headingBackground onClicked: { - activeTrip = section + if (activeTrip === section) + activeTrip = "" + else + activeTrip = section } } Controls.Label { @@ -313,7 +316,10 @@ Kirigami.ScrollablePage { MouseArea { anchors.fill: sectionText onClicked: { - activeTrip = section + if (activeTrip === section) + activeTrip = "" + else + activeTrip = section } } }