Fix extension update badge reset when app resumed (#6822)

This commit is contained in:
Ivan Iskandar
2022-03-25 22:11:16 +07:00
committed by GitHub
parent 5c0a43e8d6
commit ef600c0956
3 changed files with 6 additions and 5 deletions
@@ -39,10 +39,10 @@ internal class ExtensionGithubApi {
}
}
suspend fun checkForUpdates(context: Context): List<Extension.Installed> {
suspend fun checkForUpdates(context: Context): List<Extension.Installed>? {
// Limit checks to once a day at most
if (Date().time < preferences.lastExtCheck().get() + TimeUnit.DAYS.toMillis(1)) {
return emptyList()
return null
}
val extensions = findExtensions()