Fix DailyCheckWork initialDelay being negative

This commit is contained in:
FooIbar authored and tarsin committed 2023-02-22 21:50:36 +08:00
1 parent ffa7a74575
commit 6c7c6e4b22
1 file changed
+1
@@ -86,6 +86,7 @@ private val whenToWork
private val initialDelay
get() = Duration.between(LocalDateTime.now(), whenToWork)
.run { if (isNegative) plusDays(1) else this }
private fun getDailyCheckWorkRequest(): PeriodicWorkRequest {
val constraints = Constraints.Builder()