mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
1b9581369a
commit
54720e6cff
5 changed files with 6 additions and 11 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue