A fully functional Android app built entirely with Kotlin and Jetpack Compose
Small fix for naming and boolean logic
Angie Sasmitadbbe8ffecba4
diff --git a/core/designsystem/src/androidTest/java/com/google/samples/apps/nowinandroid/core/designsystem/ThemeTest.kt b/core/designsystem/src/androidTest/java/com/google/samples/apps/nowinandroid/core/designsystem/ThemeTest.ktindex fa227e358..a047d838b 100644--- a/core/designsystem/src/androidTest/java/com/google/samples/apps/nowinandroid/core/designsystem/ThemeTest.kt+++ b/core/designsystem/src/androidTest/java/com/google/samples/apps/nowinandroid/core/designsystem/ThemeTest.kt@@ -112,7 +112,7 @@ class ThemeTest {assertEquals(gradientColors, LocalGradientColors.current)val backgroundTheme = defaultBackgroundTheme(colorScheme)assertEquals(backgroundTheme, LocalBackgroundTheme.current)- val tintTheme = dynamicTintTheme(colorScheme)+ val tintTheme = dynamicTintThemeWithFallback(colorScheme)assertEquals(tintTheme, LocalTintTheme.current)}}@@ -132,7 +132,7 @@ class ThemeTest {assertEquals(gradientColors, LocalGradientColors.current)val backgroundTheme = defaultBackgroundTheme(colorScheme)assertEquals(backgroundTheme, LocalBackgroundTheme.current)- val tintTheme = dynamicTintTheme(colorScheme)+ val tintTheme = dynamicTintThemeWithFallback(colorScheme)assertEquals(tintTheme, LocalTintTheme.current)}}@@ -267,7 +267,7 @@ class ThemeTest {return TintTheme()}- private fun dynamicTintTheme(colorScheme: ColorScheme): TintTheme {+ private fun dynamicTintThemeWithFallback(colorScheme: ColorScheme): TintTheme {return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {TintTheme(colorScheme.primary)} else {diff --git a/feature/settings/src/main/java/com/google/samples/apps/nowinandroid/feature/settings/SettingsDialog.kt b/feature/settings/src/main/java/com/google/samples/apps/nowinandroid/feature/settings/SettingsDialog.ktindex b2d7ab429..a824c1db3 100644--- a/feature/settings/src/main/java/com/google/samples/apps/nowinandroid/feature/settings/SettingsDialog.kt+++ b/feature/settings/src/main/java/com/google/samples/apps/nowinandroid/feature/settings/SettingsDialog.kt@@ -98,7 +98,7 @@ fun SettingsDialog(* height recalculation during recomposition. This, however, causes* Dialog's to occupy full width in Compact mode. Therefore max width* is configured below. This should be removed when there's fix to- * b/221643630+ * https://issuetracker.google.com/issues/221643630*/AlertDialog(properties = DialogProperties(usePlatformDefaultWidth = false),@@ -174,12 +174,12 @@ private fun SettingsPanel(Column(Modifier.selectableGroup()) {SettingsDialogThemeChooserRow(text = stringResource(string.dynamic_color_yes),- selected = settings.useDynamicColor == true,+ selected = settings.useDynamicColor,onClick = { onChangeDynamicColorPreference(true) })SettingsDialogThemeChooserRow(text = stringResource(string.dynamic_color_no),- selected = settings.useDynamicColor == false,+ selected = !settings.useDynamicColor,onClick = { onChangeDynamicColorPreference(false) })}