diff --git a/app/src/main/java/io/legado/app/constant/Theme.kt b/app/src/main/java/io/legado/app/constant/Theme.kt index 720c339f9..896e73ea0 100644 --- a/app/src/main/java/io/legado/app/constant/Theme.kt +++ b/app/src/main/java/io/legado/app/constant/Theme.kt @@ -7,18 +7,13 @@ enum class Theme { Dark, Light, Auto, Transparent; companion object { - fun getTheme(): Theme { - return if (AppConfig.isNightTheme) { - Dark - } else Light - } + fun getTheme() = + if (AppConfig.isNightTheme) Dark + else Light - fun getTheme(backgroundColor: Int): Theme { - return if (ColorUtils.isColorLight(backgroundColor)) { - Light - } else { - Dark - } - } + fun getTheme(backgroundColor: Int) = + if (ColorUtils.isColorLight(backgroundColor)) Light + else Dark + } } \ No newline at end of file