mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-12 21:42:49 +01:00
Fix: wrong calculation of nextUpdate when setting custom fetchInterval (#1206)
This commit is contained in:
parent
d42f776c5c
commit
223af5508f
@ -107,7 +107,7 @@ class FetchInterval(
|
|||||||
interval.absoluteValue.takeIf { interval < 0 }
|
interval.absoluteValue.takeIf { interval < 0 }
|
||||||
?: increaseInterval(interval, timeSinceLatest, increaseWhenOver = 10),
|
?: 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 {
|
private fun increaseInterval(delta: Int, timeSinceLatest: Int, increaseWhenOver: Int): Int {
|
||||||
|
Loading…
Reference in New Issue
Block a user