Skip to content

Commit 1576bcb

Browse files
committed
fix app
1 parent fc29a40 commit 1576bcb

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

app/src/main/java/com/pira/gnetp/ui/theme/Theme.kt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ import androidx.compose.ui.platform.LocalContext
1313
import androidx.compose.ui.graphics.Color
1414

1515
private val DarkColorScheme = darkColorScheme(
16-
primary = Purple80,
16+
primary = defaultPrimaryColor,
1717
secondary = PurpleGrey80,
1818
tertiary = Pink80
1919
)
2020

2121
private val LightColorScheme = lightColorScheme(
22-
primary = Purple40,
22+
primary = defaultPrimaryColor,
2323
secondary = PurpleGrey40,
2424
tertiary = Pink40
2525

@@ -62,11 +62,6 @@ fun GNetTheme(
6262
)
6363
}
6464
}
65-
Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
66-
val context = LocalContext.current
67-
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
68-
}
69-
7065
darkTheme -> DarkColorScheme
7166
else -> LightColorScheme
7267
}

app/src/main/java/com/pira/gnetp/ui/theme/ThemeManager.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ class ThemeManager(private val context: Context) {
2121
}
2222

2323
fun loadThemeSettings(): ThemeSettings {
24-
val themeModeStr = prefs.getString("theme_mode", ThemeMode.SYSTEM.name) ?: ThemeMode.SYSTEM.name
24+
val themeModeStr = prefs.getString("theme_mode", ThemeMode.LIGHT.name) ?: ThemeMode.LIGHT.name
2525
val themeMode = try {
2626
ThemeMode.valueOf(themeModeStr)
2727
} catch (e: IllegalArgumentException) {
28-
ThemeMode.SYSTEM
28+
ThemeMode.LIGHT
2929
}
3030

3131
val primaryColor = prefs.getInt("primary_color", defaultPrimaryColor.toArgb())

0 commit comments

Comments
 (0)