Skip to content

Commit 8e5d4df

Browse files
committed
feat: enable dynamic colors by default
1 parent dee4ddd commit 8e5d4df

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

app/src/main/kotlin/com/androidvip/sysctlgui/ui/main/MainViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MainViewModel(
1616
) : BaseViewModel<MainViewEvent, MainViewState, MainViewEffect>() {
1717
private val themeSettingsFlow: Flow<ThemeSettings> = combine(
1818
appPrefs.observeKey(Prefs.ForceDarkTheme.key, false),
19-
appPrefs.observeKey(Prefs.DynamicColors.key, false),
19+
appPrefs.observeKey(Prefs.DynamicColors.key, true),
2020
appPrefs.observeKey(Prefs.ContrastLevel.key, CONTRAST_LEVEL_NORMAL)
2121
) { forceDark, dynamicColors, contrastLevel ->
2222
ThemeSettings(forceDark, dynamicColors, contrastLevel)

app/src/main/kotlin/com/androidvip/sysctlgui/ui/main/MainViewState.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ data class MainViewState(
1515

1616
data class ThemeSettings(
1717
val forceDark: Boolean = false,
18-
val dynamicColors: Boolean = false,
18+
val dynamicColors: Boolean = true,
1919
val contrastLevel: Int = CONTRAST_LEVEL_NORMAL
2020
)
2121

common/design/src/main/java/com/androidvip/sysctlgui/design/theme/Theme.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ private val highContrastDarkColorScheme = darkColorScheme(
243243
@Composable
244244
fun SysctlGuiTheme(
245245
darkTheme: Boolean = isSystemInDarkTheme(),
246-
dynamicColor: Boolean = false,
246+
dynamicColor: Boolean = true,
247247
contrastLevel: Int = 1,
248248
content: @Composable () -> Unit
249249
) {

data/src/main/java/com/androidvip/sysctlgui/data/repository/AppSettingsRepositoryImpl.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ class AppSettingsRepositoryImpl(
3030
) : AppSettingsRepository {
3131
override suspend fun getAppSettings(): List<AppSetting<*>> = withContext(ioContext) {
3232
val isTaskerInstalled = isTaskerInstalled()
33-
val usingDynamicColors = sharedPreferences.getBoolean(Prefs.DynamicColors.key, false)
3433
val supportsDynamicColors = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S
34+
val usingDynamicColors =
35+
sharedPreferences.getBoolean(Prefs.DynamicColors.key, supportsDynamicColors)
3536
val currentCommitMode = sharedPreferences.getString(
3637
Prefs.CommitMode.key,
3738
CommitMode.SYSCTL.name.lowercase()

0 commit comments

Comments
 (0)