Perform download cache renewal async

Don't block on cache renewals, but notify library on updates so that the badges show up when ready.

We skip the cache when checking if a chapter is downloaded for the reader assuming that it's a
relatively low cost to check for a single chapter.

(Probably) fixes #8254 / fixes #7847
This commit is contained in:
arkon
2022-10-21 15:00:41 -04:00
parent 93925a7286
commit 7e40680af0
6 changed files with 99 additions and 52 deletions

View File

@@ -42,6 +42,9 @@ class ExtensionManager(
private val preferences: SourcePreferences = Injekt.get(),
) {
var isInitialized = false
private set
/**
* API where all the available extensions can be found.
*/
@@ -102,6 +105,8 @@ class ExtensionManager(
_untrustedExtensionsFlow.value = extensions
.filterIsInstance<LoadResult.Untrusted>()
.map { it.extension }
isInitialized = true
}
/**