mirror of
https://github.com/gkd-kit/gkd.git
synced 2024-11-16 03:32:38 +08:00
perf: update rule data in default thread
This commit is contained in:
parent
75797a89cc
commit
9f0f026459
|
@ -15,6 +15,7 @@ import kotlinx.coroutines.delay
|
|||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.SharingStarted
|
||||
import kotlinx.coroutines.flow.combine
|
||||
import kotlinx.coroutines.flow.flowOn
|
||||
import kotlinx.coroutines.flow.map
|
||||
import kotlinx.coroutines.flow.stateIn
|
||||
import kotlinx.coroutines.flow.update
|
||||
|
@ -292,7 +293,7 @@ val ruleSummaryFlow by lazy {
|
|||
appIdToAllGroups = appAllGroups.mapValues { e -> e.value.toImmutableList() }
|
||||
.toImmutableMap()
|
||||
)
|
||||
}.stateIn(appScope, SharingStarted.Eagerly, RuleSummary())
|
||||
}.flowOn(Dispatchers.Default).stateIn(appScope, SharingStarted.Eagerly, RuleSummary())
|
||||
}
|
||||
|
||||
private fun loadSubs(id: Long): RawSubscription {
|
||||
|
|
Loading…
Reference in New Issue
Block a user