mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Fix: wrong calculation of nextUpdate when setting custom fetchInterval (#1206)
This commit is contained in:
parent
d42f776c5c
commit
223af5508f
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue