Cleanup [BaseColorScheme.getColorScheme]

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
This commit is contained in:
Secozzi 2024-06-06 00:46:57 +02:00
parent edae0f5222
commit 87348bbff6
No known key found for this signature in database
GPG key ID: 71E9C97D8DDC2662

View file

@ -9,18 +9,15 @@ internal abstract class BaseColorScheme {
abstract val lightScheme: ColorScheme
fun getColorScheme(isDark: Boolean, isAmoled: Boolean): ColorScheme {
return (if (isDark) darkScheme else lightScheme)
.let {
if (isDark && isAmoled) {
it.copy(
background = Color.Black,
onBackground = Color.White,
surface = Color.Black,
onSurface = Color.White,
)
} else {
it
}
}
if (!isDark) return lightScheme
if (!isAmoled) return darkScheme
return darkScheme.copy(
background = Color.Black,
onBackground = Color.White,
surface = Color.Black,
onSurface = Color.White,
)
}
}