mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-27 08:16:36 +03:00
Cleanup [BaseColorScheme.getColorScheme]
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
This commit is contained in:
parent
edae0f5222
commit
87348bbff6
1 changed files with 10 additions and 13 deletions
|
@ -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(
|
|
||||||
|
return darkScheme.copy(
|
||||||
background = Color.Black,
|
background = Color.Black,
|
||||||
onBackground = Color.White,
|
onBackground = Color.White,
|
||||||
surface = Color.Black,
|
surface = Color.Black,
|
||||||
onSurface = Color.White,
|
onSurface = Color.White,
|
||||||
)
|
)
|
||||||
} else {
|
|
||||||
it
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue