diff --git a/qt-mobile/qml/DiveList.qml b/qt-mobile/qml/DiveList.qml index de511f1d9..95af9a973 100644 --- a/qt-mobile/qml/DiveList.qml +++ b/qt-mobile/qml/DiveList.qml @@ -263,6 +263,20 @@ Kirigami.ScrollablePage { } } } + Connections { + target: header + onTitleBarClicked: { + // if we can see the dive list and it's not at the top already, go to the top, + // otherwise have the title bar handle the click (for bread-crumb navigation) + if (stackView.currentItem.objectName === "DiveList" && diveListView.contentY > Kirigami.Units.gridUnit) { + diveListView.positionViewAtBeginning() + event.accepted = true + } else { + event.accepted = false + } + } + } + } property QtObject addDiveAction: Action {