mirror of
https://github.com/mihonapp/mihon.git
synced 2025-01-28 02:44:56 +01:00
Cleanup [BaseColorScheme.getColorScheme]
This commit is contained in:
parent
fb86c470f6
commit
95d4df9ca8
@ -9,18 +9,15 @@ internal abstract class BaseColorScheme {
|
|||||||
abstract val lightScheme: ColorScheme
|
abstract val lightScheme: ColorScheme
|
||||||
|
|
||||||
fun getColorScheme(isDark: Boolean, isAmoled: Boolean): ColorScheme {
|
fun getColorScheme(isDark: Boolean, isAmoled: Boolean): ColorScheme {
|
||||||
return (if (isDark) darkScheme else lightScheme)
|
if (!isDark) return lightScheme
|
||||||
.let {
|
|
||||||
if (isDark && isAmoled) {
|
if (!isAmoled) return darkScheme
|
||||||
it.copy(
|
|
||||||
background = Color.Black,
|
return darkScheme.copy(
|
||||||
onBackground = Color.White,
|
background = Color.Black,
|
||||||
surface = Color.Black,
|
onBackground = Color.White,
|
||||||
onSurface = Color.White,
|
surface = Color.Black,
|
||||||
)
|
onSurface = Color.White,
|
||||||
} else {
|
)
|
||||||
it
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user