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:
parent
2637106309
commit
b01e9fb0a8
@ -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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user