diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-08-15 00:03:15 +0200 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2019-09-14 13:20:59 +0200 |
commit | 54720e6cff65ae860fb78431324b75203e71809a (patch) | |
tree | 1986f2fc328ef3f48ccdb70bf54ef0a3454ea81d /mobile-widgets/qml | |
parent | 1b9581369af95bdf366f08c0d00d24c315d339bb (diff) | |
download | subsurface-54720e6cff65ae860fb78431324b75203e71809a.tar.gz |
Mobile: move tripNrDive from DiveObjectHelper to DiveListModel
We don't want to generate a DiveObjectHelper numerous times for
every item in the dive list. Therefore, return this datum directly
from the model.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r-- | mobile-widgets/qml/DiveList.qml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index 6be6d6d8f..b53a8c42b 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -40,7 +40,7 @@ Kirigami.ScrollablePage { id: diveDelegate Kirigami.AbstractListItem { // this looks weird, but it's how we can tell that this dive isn't in a trip - property bool diveOutsideTrip: dive.tripNrDives === 0 + property bool diveOutsideTrip: tripNrDives === 0 leftPadding: 0 topPadding: 0 id: innerListItem @@ -85,7 +85,7 @@ Kirigami.ScrollablePage { } NumberAnimation { property: "height" - duration: 200 + 20 * dive.tripNrDives + duration: 200 + 20 * tripNrDives easing.type: Easing.InOutQuad } } @@ -96,7 +96,7 @@ Kirigami.ScrollablePage { SequentialAnimation { NumberAnimation { property: "height" - duration: 200 + 20 * dive.tripNrDives + duration: 200 + 20 * tripNrDives easing.type: Easing.InOutQuad } NumberAnimation { |