diff options
author | Joakim Bygdell <j.bygdell@gmail.com> | 2018-03-09 14:29:32 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-03-19 12:01:14 -0700 |
commit | 93ba8f1a050b2700613bfe0c9f106ee4bff7e5bf (patch) | |
tree | 6c57e012b6571603e9e26d9e07c06afb5bdc7403 /mobile-widgets | |
parent | 6badba2bae3f3437502bf444b94c956f3f0f4073 (diff) | |
download | subsurface-93ba8f1a050b2700613bfe0c9f106ee4bff7e5bf.tar.gz |
Mobile: for multiple buddies pick index of first
When a dive has multiple buddies, pick the index of the first
to prevent the user from hanving to scroll through the entire
list when editing.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qml/DiveDetails.qml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index 82150cc5b..9cfbbe437 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -242,10 +242,11 @@ Kirigami.Page { watertemp = currentItem.modelData.dive.waterTemp suitIndex = manager.suitList.indexOf(currentItem.modelData.dive.suit) if (currentItem.modelData.dive.buddy.indexOf(",") > 0) { - buddyText = currentItem.modelData.dive.buddy; + buddyIndex = manager.buddyList.indexOf(currentItem.modelData.dive.buddy.split(",", 1).toString()) } else { buddyIndex = manager.buddyList.indexOf(currentItem.modelData.dive.buddy) } + buddyText = currentItem.modelData.dive.buddy; divemasterIndex = manager.divemasterList.indexOf(currentItem.modelData.dive.divemaster) notes = currentItem.modelData.dive.notes if (currentItem.modelData.dive.singleWeight) { |