Skip to content

Commit

Permalink
fix order in which dao is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed Feb 12, 2024
1 parent bd7c0cc commit 9b7e833
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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? =
Expand Down

0 comments on commit 9b7e833

Please sign in to comment.