From a79c45e4010a18f8ffe0742ab844743eeeebab9e Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 15 Aug 2019 00:30:56 +0200 Subject: Mobile: return depthDuration directly from DiveListModel We don't want to generate a DiveObjectHelper numerous times for every item in the dive list. Therefore, return this data directly from the model. In this case, don't remove from DiveObjectHelper, as these data might be used by grantlee templates. Signed-off-by: Berthold Stoeger --- mobile-widgets/qml/DiveList.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mobile-widgets/qml/DiveList.qml') diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index 99a93be2a..6c3091883 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -178,7 +178,7 @@ Kirigami.ScrollablePage { } // let's try to show the depth / duration very compact Controls.Label { - text: dive.depth + ' / ' + dive.duration + text: depthDuration width: Math.max(Kirigami.Units.gridUnit * 3, paintedWidth) // helps vertical alignment throughout listview font.pointSize: subsurfaceTheme.smallPointSize color: innerListItem.checked ? subsurfaceTheme.darkerPrimaryTextColor : secondaryTextColor -- cgit v1.2.3-70-g09d2