Load extensions off the main thread (#3788)

Assisted-by: Claude:claude-opus-5
This commit is contained in:
AntsyLich
2026-08-16 22:35:38 +06:00
committed by GitHub
parent 00fb597ae9
commit 5fa5f7e159
3 changed files with 11 additions and 3 deletions
@@ -12,6 +12,7 @@ import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
@@ -45,6 +46,8 @@ class AndroidSourceManager(
init {
scope.launch {
extensionManager.isInitialized.first { it }
extensionManager.installedExtensionsFlow
.collectLatest { extensions ->
val mutableMap = ConcurrentHashMap<Long, Source>(