Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from gkd-kit:main #17

Merged
merged 9 commits into from
Jun 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
perf: update rule data in default thread
  • Loading branch information
lisonge committed Jun 8, 2024
commit 9f0f02645978a088f39a39ced7484d3df159296b
3 changes: 2 additions & 1 deletion app/src/main/kotlin/li/songe/gkd/util/SubsState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down