Skip to content

Commit a12182e

Browse files
committed
Update project
1 parent 3647013 commit a12182e

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

mobile/src/main/kotlin/org/michaelbel/template/ui/settings/SettingsScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

mobile/src/main/kotlin/org/michaelbel/template/ui/settings/SettingsViewModel.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

mobile/src/main/kotlin/org/michaelbel/template/ui/settings/model/SettingsModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ package org.michaelbel.template.ui.settings.model
33
import org.michaelbel.shared.mvi.Model
44

55
data class SettingsModel(
6-
val dynamicColorsEnabled: Boolean = false
6+
val dynamicColors: Boolean = false
77
): Model

0 commit comments

Comments
 (0)