initialization fixes

This commit is contained in:
2023-11-30 01:22:43 +06:00
parent 6f174cae1d
commit 871b27f37d
2 changed files with 45 additions and 47 deletions

View File

@@ -10,9 +10,9 @@ import kotlinx.coroutines.Dispatchers
class FlowState<T>(
initial: T,
internalScope: CoroutineScope = CoroutineScope(Dispatchers.Main)
internalScope: CoroutineScope = CoroutineScope(Dispatchers.Default)
) : MutableState<T>,
SpecialMutableStateFlow.Default<T>(initial, internalScope) {
SpecialMutableStateFlow<T>(initial, internalScope) {
private var internalValue: T = initial
override var value: T
get() = internalValue