From 7f524a638d2c0a4ab26502def7491eca4af56c34 Mon Sep 17 00:00:00 2001 From: jacobrein Date: Tue, 10 Sep 2024 14:01:27 -0600 Subject: [PATCH] - Use rememberSwatchStyle in dynamic color scheme Utilize rememberSwatchStyle in the dynamic color scheme calculation to ensure consistent color theming. --- .../com/programmersbox/uiviews/utils/OtakuMaterialTheme.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UIViews/src/main/java/com/programmersbox/uiviews/utils/OtakuMaterialTheme.kt b/UIViews/src/main/java/com/programmersbox/uiviews/utils/OtakuMaterialTheme.kt index 15b4ca1ad..5f77b9127 100644 --- a/UIViews/src/main/java/com/programmersbox/uiviews/utils/OtakuMaterialTheme.kt +++ b/UIViews/src/main/java/com/programmersbox/uiviews/utils/OtakuMaterialTheme.kt @@ -14,6 +14,7 @@ import androidx.compose.material3.lightColorScheme import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.DisposableEffect +import androidx.compose.runtime.getValue import androidx.compose.runtime.remember import androidx.compose.runtime.staticCompositionLocalOf import androidx.compose.ui.graphics.Color @@ -109,10 +110,13 @@ fun OtakuMaterialTheme( } } } else { + val swatchStyle by rememberSwatchStyle() + rememberDynamicColorScheme( seedColor = themeColor.seedColor, isAmoled = isAmoledMode, isDark = darkTheme, + style = swatchStyle, ) }