fix: Init ViewModel on a default dispatchers pool

This commit is contained in:
Artem Chepurnoy 2024-02-28 13:53:02 +02:00
parent 2dc4740bc1
commit 13e2b7f360
No known key found for this signature in database
GPG Key ID: FAC37D0CF674043E
1 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ import com.artemchep.keyguard.feature.navigation.NavigationEntry
import com.artemchep.keyguard.platform.LeBundle
import com.artemchep.keyguard.platform.LeContext
import com.artemchep.keyguard.platform.leBundleOf
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.plus
@ -51,7 +52,7 @@ class FlowHolderViewModel(
store.getOrPut(key) {
val vmCoroutineScopeJob = SupervisorJob(parent = scope.job)
val vmCoroutineScope = WindowCoroutineScopeImpl(
scope = scope + vmCoroutineScopeJob,
scope = scope + vmCoroutineScopeJob + Dispatchers.Default,
showMessage = showMessage,
)
val vmScope = RememberStateFlowScopeImpl(