mobile/divedetails: send current-dive changes up to mobile UI

To unify mobile and desktop, let's use the current_dive variable
of the core to indicate the current dive.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Berthold Stoeger 2019-12-08 17:42:56 +01:00 committed by Dirk Hohndel
parent 1f669f9714
commit 8e9e536ffd

View file

@ -334,6 +334,13 @@ Kirigami.Page {
ScrollBar.vertical: ScrollBar { }
}
ScrollIndicator.horizontal: ScrollIndicator { }
Connections {
target: diveModel
onCurrentDiveChanged: {
currentIndex = index.row
diveDetailsListView.positionViewAtIndex(currentIndex, ListView.End)
}
}
}
}
Flickable {