Mobile: derive the index from the dive id

The previous code assumes that both the vertical dive list and the list of dive
details which allows the horizontal swiping from dive to dive are based on the
same model.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2019-11-06 06:07:19 +01:00
parent 2637106309
commit b01e9fb0a8

View file

@ -229,9 +229,9 @@ Kirigami.Page {
}
}
function showDiveIndex(index) {
currentIndex = index;
diveDetailsListView.positionViewAtIndex(index, ListView.End);
function showDiveIndex(id) {
currentIndex = diveModel.getIdxForId(id);
diveDetailsListView.positionViewAtIndex(currentIndex, ListView.End);
}
function endEditMode() {