Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
fix default color
Browse files Browse the repository at this point in the history
  • Loading branch information
matsumo0922 committed Dec 11, 2023
1 parent a16dfeb commit 9ac4797
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class PixiViewPreferencesDataStore(
else -> ThemeConfig.System
},
themeColorConfig = when (it.themeColorConfig) {
ThemeColorConfigProto.THEME_COLOR_CONFIG_RED -> ThemeColorConfig.Red
ThemeColorConfigProto.THEME_COLOR_CONFIG_BLUE -> ThemeColorConfig.Blue
ThemeColorConfigProto.THEME_COLOR_CONFIG_BROWN -> ThemeColorConfig.Brown
ThemeColorConfigProto.THEME_COLOR_CONFIG_GREEN -> ThemeColorConfig.Green
Expand Down Expand Up @@ -99,8 +100,7 @@ class PixiViewPreferencesDataStore(
ThemeColorConfig.Green -> ThemeColorConfigProto.THEME_COLOR_CONFIG_GREEN
ThemeColorConfig.Pink -> ThemeColorConfigProto.THEME_COLOR_CONFIG_PINK
ThemeColorConfig.Purple -> ThemeColorConfigProto.THEME_COLOR_CONFIG_PURPLE
ThemeColorConfig.Default -> ThemeColorConfigProto.THEME_COLOR_CONFIG_DEFAULT
else -> ThemeColorConfigProto.THEME_COLOR_CONFIG_BLUE
ThemeColorConfig.Red -> ThemeColorConfigProto.THEME_COLOR_CONFIG_RED
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ option java_multiple_files = true;

enum ThemeColorConfigProto {
THEME_COLOR_CONFIG_UNSPECIFIED = 0;
THEME_COLOR_CONFIG_DEFAULT = 1;
THEME_COLOR_CONFIG_RED = 1;
THEME_COLOR_CONFIG_BLUE = 2;
THEME_COLOR_CONFIG_BROWN = 3;
THEME_COLOR_CONFIG_GREEN = 4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import androidx.compose.runtime.Stable

@Stable
enum class ThemeColorConfig {
Default, Blue, Brown, Green, Pink, Purple
Red, Blue, Brown, Green, Pink, Purple
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ data class UserData(
return UserData(
pixiViewId = "",
themeConfig = ThemeConfig.System,
themeColorConfig = ThemeColorConfig.Default,
themeColorConfig = ThemeColorConfig.Red,
isAgreedPrivacyPolicy = false,
isAgreedTermsOfService = false,
isAppLock = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ val DarkDefaultColorScheme = darkColorScheme(
fun PixiViewTheme(
fanboxCookie: String = "",
fanboxMetadata: FanboxMetaData = FanboxMetaData.dummy(),
themeColorConfig: ThemeColorConfig = ThemeColorConfig.Default,
themeColorConfig: ThemeColorConfig = ThemeColorConfig.Red,
shouldUseDarkTheme: Boolean = isSystemInDarkTheme(),
enableDynamicTheme: Boolean = false,
content: @Composable () -> Unit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ internal fun SettingThemeColorSection(
key = { it.name },
) {
val color = when (it) {
ThemeColorConfig.Red -> if (isDarkMode) DarkDefaultColorScheme else LightDefaultColorScheme
ThemeColorConfig.Blue -> if (isDarkMode) DarkBlueColorScheme else LightBlueColorScheme
ThemeColorConfig.Brown -> if (isDarkMode) DarkBrownColorScheme else LightBrownColorScheme
ThemeColorConfig.Green -> if (isDarkMode) DarkGreenColorScheme else LightGreenColorScheme
ThemeColorConfig.Purple -> if (isDarkMode) DarkPurpleColorScheme else LightPurpleColorScheme
ThemeColorConfig.Pink -> if (isDarkMode) DarkPinkColorScheme else LightPinckColorScheme
else -> if (isDarkMode) DarkDefaultColorScheme else LightDefaultColorScheme
}

SettingThemeColorItem(
Expand Down

0 comments on commit 9ac4797

Please sign in to comment.