Fix: wrong calculation of nextUpdate when setting custom fetchInterval (#1206)
(cherry picked from commit 223af5508f6b56c7d7bf1c68d3c96a59a1ebc5d7)
This commit is contained in:
parent
03aa27fb6b
commit
0753ffe425
@ -107,7 +107,7 @@ class FetchInterval(
|
||||
interval.absoluteValue.takeIf { interval < 0 }
|
||||
?: increaseInterval(interval, timeSinceLatest, increaseWhenOver = 10),
|
||||
)
|
||||
return latestDate.plusDays((cycle + 1) * interval.toLong()).toEpochSecond(dateTime.offset) * 1000
|
||||
return latestDate.plusDays((cycle + 1) * interval.absoluteValue.toLong()).toEpochSecond(dateTime.offset) * 1000
|
||||
}
|
||||
|
||||
private fun increaseInterval(delta: Int, timeSinceLatest: Int, increaseWhenOver: Int): Int {
|
||||
|
Loading…
x
Reference in New Issue
Block a user