mirror of
https://github.com/mihonapp/mihon.git
synced 2026-10-16 13:48:09 -07:00
Read extension stores once at startup
Refreshing stores now fetches them all first and writes them in one transaction.
This commit is contained in:
@@ -15,6 +15,7 @@ import eu.kanade.tachiyomi.util.storage.copyAndSetReadOnlyTo
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.awaitAll
|
||||
import kotlinx.coroutines.flow.first
|
||||
import kotlinx.coroutines.withContext
|
||||
import logcat.LogPriority
|
||||
import mihon.app.di.appGraph
|
||||
@@ -115,7 +116,7 @@ internal object ExtensionLoader {
|
||||
): List<Extension.Installed> {
|
||||
val trustExtension = context.appGraph.trustExtension
|
||||
val sourcePreferences = context.appGraph.sourcePreferences
|
||||
val stores = context.appGraph.extensionStoreRepository.getAll()
|
||||
val stores = context.appGraph.extensionStoreRepository.getAllAsFlow().first()
|
||||
val enabledContentWarnings = sourcePreferences.enabledContentWarnings.get()
|
||||
val applyContentWarningsToInstalled = sourcePreferences.applyContentWarningsToInstalled.get()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user