Load extensions off the main thread (#3788)
Assisted-by: Claude:claude-opus-5
This commit is contained in:
@@ -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>(
|
||||
|
||||
Reference in New Issue
Block a user