From c6b3309d1360e329252f5ab4c9dc7f345ea22694 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 15 Aug 2019 00:11:39 +0200 Subject: Mobile: return dateTime 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') diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index b53a8c42b..ddcb81834 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -171,7 +171,7 @@ Kirigami.ScrollablePage { Controls.Label { id: dateLabel - text: dive.date + " " + dive.time + text: dateTime width: Math.max(locationText.width * 0.45, paintedWidth) // helps vertical alignment throughout listview font.pointSize: subsurfaceTheme.smallPointSize color: innerListItem.checked ? subsurfaceTheme.darkerPrimaryTextColor : secondaryTextColor -- cgit v1.2.3-70-g09d2