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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-02-05 08:29:05 +01:00 committed by Dirk Hohndel
parent f7c73f1987
commit 48ccd114fc

View file

@ -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