From da76d4854fdd2cedf550d93a5ee2c22cefdc972a Mon Sep 17 00:00:00 2001 From: Jays2Kings Date: Mon, 5 Jul 2021 23:40:04 -0400 Subject: [PATCH] Fix crash when set theme not in use no longer exists --- .../ui/setting/SettingsGeneralController.kt | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt index 502674abce..2552e8bf1a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt @@ -99,18 +99,7 @@ class SettingsGeneralController : SettingsController() { titleRes = R.string.app_theme lastScrollPostionLight = lastThemeXLight lastScrollPostionDark = lastThemeXDark - summary = if (preferences.nightMode() - .get() == AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM - ) { - val lightTheme = preferences.lightTheme().get().nameRes - val darkTheme = preferences.darkTheme().get().nameRes - val nightMode = context.isInNightMode() - mutableListOf(context.getString(lightTheme), context.getString(darkTheme)).apply { - if (nightMode) reverse() - }.joinToString(" / ") - } else { - context.getString(context.getPrefTheme(preferences).nameRes) - } + summary = context.getString(context.getPrefTheme(preferences).nameRes) activity = this@SettingsGeneralController.activity }