Skip to content

Commit 552a1ef

Browse files
author
oliexdev
committed
update last sync timestamp even if you automatically sync by openScale app
1 parent 67c0ba7 commit 552a1ef

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • src/app/src/main/java/com/health/openscale/sync/core/service

src/app/src/main/java/com/health/openscale/sync/core/service/SyncService.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import timber.log.Timber
3838
import timber.log.Timber.Forest.plant
3939
import java.math.BigDecimal
4040
import java.math.RoundingMode
41+
import java.time.Instant
4142
import java.util.Date
4243

4344
class SyncService : Service() {
@@ -178,6 +179,8 @@ class SyncService : Service() {
178179
}
179180
}
180181
}
182+
183+
syncService.viewModel().setLastSync(Instant.now())
181184
}
182185

183186
stopForeground(STOP_FOREGROUND_REMOVE)

0 commit comments

Comments
 (0)