mirror of
https://github.com/gkd-kit/gkd.git
synced 2024-11-16 11:42:22 +08:00
perf: dark theme debounce
This commit is contained in:
parent
db06633bfb
commit
f66c49ce65
|
@ -25,7 +25,7 @@ import li.songe.gkd.util.storeFlow
|
|||
import li.songe.gkd.util.updateSubscription
|
||||
|
||||
class MainViewModel : ViewModel() {
|
||||
val enableDarkThemeFlow = storeFlow.debounce(200).map { s -> s.enableDarkTheme }.stateIn(
|
||||
val enableDarkThemeFlow = storeFlow.debounce(300).map { s -> s.enableDarkTheme }.stateIn(
|
||||
viewModelScope,
|
||||
SharingStarted.Eagerly,
|
||||
storeFlow.value.enableDarkTheme
|
||||
|
|
Loading…
Reference in New Issue
Block a user