File tree Expand file tree Collapse file tree
mobile/src/main/kotlin/org/michaelbel/template/ui/settings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ fun SettingsScreen(
8080 },
8181 trailingContent = {
8282 Switch (
83- checked = state.dynamicColorsEnabled ,
83+ checked = state.dynamicColors ,
8484 onCheckedChange = null
8585 )
8686 }
Original file line number Diff line number Diff line change @@ -21,11 +21,13 @@ class SettingsViewModel(
2121 is SettingsIntent .CollectDynamicColors -> {
2222 launch {
2323 appInteractor.dynamicColorsFlow.collectLatest { enabled ->
24- reduce { it.copy(dynamicColorsEnabled = enabled) }
24+ reduce { it.copy(dynamicColors = enabled) }
2525 }
2626 }
2727 }
28- is SettingsIntent .ToggleDynamicColors -> launch { appInteractor.setDynamicColors(! stateFlow.value.dynamicColorsEnabled) }
28+ is SettingsIntent .ToggleDynamicColors -> {
29+ launch { appInteractor.setDynamicColors(! stateFlow.value.dynamicColors) }
30+ }
2931 }
3032 }
3133}
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ package org.michaelbel.template.ui.settings.model
33import org.michaelbel.shared.mvi.Model
44
55data class SettingsModel (
6- val dynamicColorsEnabled : Boolean = false
6+ val dynamicColors : Boolean = false
77): Model
You can’t perform that action at this time.
0 commit comments