From 48ccd114fcb5e1ca0a692c096143c2f24d8254d3 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 5 Feb 2020 08:29:05 +0100 Subject: mobile/summary: recalculate first and last dive on visibility change Recalcluate not only the statistics for the given period, but also the global first and last dive date. Signed-off-by: Berthold Stoeger --- mobile-widgets/qml/DiveSummary.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mobile-widgets/qml') diff --git a/mobile-widgets/qml/DiveSummary.qml b/mobile-widgets/qml/DiveSummary.qml index e827d4f42..3d803074e 100644 --- a/mobile-widgets/qml/DiveSummary.qml +++ b/mobile-widgets/qml/DiveSummary.qml @@ -16,8 +16,11 @@ Kirigami.ScrollablePage { title: qsTr("Dive summary") onVisibleChanged: { - if (visible) + if (visible) { Backend.summaryCalculation(selectionPrimary.currentIndex, selectionSecondary.currentIndex) + firstDive = Backend.firstDiveDate() + lastDive = Backend.lastDiveDate() + } } Connections { target: Backend -- cgit v1.2.3-70-g09d2