From 9b7e833dfff0a9a29d3fa395ff26dbb019e1350e Mon Sep 17 00:00:00 2001 From: Tobias Zwick Date: Mon, 12 Feb 2024 14:16:24 +0100 Subject: [PATCH] fix order in which dao is updated --- .../streetcomplete/data/user/statistics/StatisticsController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/user/statistics/StatisticsController.kt b/app/src/main/java/de/westnordost/streetcomplete/data/user/statistics/StatisticsController.kt index 707d36ce1f..e26829ffb5 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/user/statistics/StatisticsController.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/user/statistics/StatisticsController.kt @@ -178,11 +178,11 @@ class StatisticsController( val today = systemTimeNow().toLocalDate() val lastUpdateDate = Instant.fromEpochMilliseconds(lastUpdate).toLocalDate() lastUpdate = nowAsEpochMilliseconds() + activeDatesDao.addToday() if (today > lastUpdateDate) { daysActive++ listeners.forEach { it.onUpdatedDaysActive() } } - activeDatesDao.addToday() } private fun getRealCountryCode(position: LatLon): String? =