mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 03:07:25 +01:00
Limit foreground extension checks to once a day
This commit is contained in:
parent
e615cba9a5
commit
bf1fb8b7bd
@ -165,9 +165,9 @@ class MainActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getExtensionUpdates() {
|
private fun getExtensionUpdates() {
|
||||||
// Limit checks to once every 2 hours at most
|
// Limit checks to once a day at most
|
||||||
val now = Date().time
|
val now = Date().time
|
||||||
if (now < preferences.lastExtCheck().getOrDefault() + TimeUnit.HOURS.toMillis(2)) {
|
if (now < preferences.lastExtCheck().getOrDefault() + TimeUnit.DAYS.toMillis(1)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user