diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceValues.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceValues.kt index eb31768a5..b9aa4c76a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceValues.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceValues.kt @@ -21,20 +21,22 @@ object PreferenceValues { /* ktlint-enable experimental:enum-entry-name-case */ - enum class AppTheme(val titleResId: Int) { + enum class AppTheme(val titleResId: Int?) { DEFAULT(R.string.theme_default), BLUE(R.string.theme_blue), GREEN_APPLE(R.string.theme_greenapple), - HOT_PINK(R.string.theme_hotpink), MIDNIGHT_DUSK(R.string.theme_midnightdusk), STRAWBERRY_DAIQUIRI(R.string.theme_strawberrydaiquiri), - YOTSUBA(R.string.theme_yotsuba) + YOTSUBA(R.string.theme_yotsuba), + + // Deprecated + HOT_PINK(null), } enum class TappingInvertMode(val shouldInvertHorizontal: Boolean = false, val shouldInvertVertical: Boolean = false) { NONE, HORIZONTAL(shouldInvertHorizontal = true), VERTICAL(shouldInvertVertical = true), - BOTH(shouldInvertHorizontal = true, shouldInvertVertical = true) + BOTH(shouldInvertHorizontal = true, shouldInvertVertical = true), } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/base/activity/BaseThemedActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/base/activity/BaseThemedActivity.kt index 5b4c7b68f..03d84e160 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/base/activity/BaseThemedActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/base/activity/BaseThemedActivity.kt @@ -34,9 +34,6 @@ abstract class BaseThemedActivity : AppCompatActivity() { fun AppCompatActivity.applyThemePreferences(preferences: PreferencesHelper) { val resIds = mutableListOf() when (preferences.appTheme().get()) { - PreferenceValues.AppTheme.DEFAULT -> { - resIds += R.style.Theme_Tachiyomi - } PreferenceValues.AppTheme.BLUE -> { resIds += R.style.Theme_Tachiyomi_DarkBlue resIds += R.style.ThemeOverlay_Tachiyomi_ColoredBars @@ -44,9 +41,6 @@ abstract class BaseThemedActivity : AppCompatActivity() { PreferenceValues.AppTheme.GREEN_APPLE -> { resIds += R.style.Theme_Tachiyomi_GreenApple } - PreferenceValues.AppTheme.HOT_PINK -> { - resIds += R.style.Theme_Tachiyomi_HotPink - } PreferenceValues.AppTheme.MIDNIGHT_DUSK -> { resIds += R.style.Theme_Tachiyomi_MidnightDusk } @@ -56,6 +50,9 @@ abstract class BaseThemedActivity : AppCompatActivity() { PreferenceValues.AppTheme.YOTSUBA -> { resIds += R.style.Theme_Tachiyomi_Yotsuba } + else -> { + resIds += R.style.Theme_Tachiyomi + } } if (preferences.themeDarkAmoled().get()) { 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 fa7799830..50f3d0dfa 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 @@ -122,8 +122,8 @@ class SettingsGeneralController : SettingsController() { key = Keys.appTheme titleRes = R.string.pref_app_theme - val appThemes = Values.AppTheme.values() - entriesRes = appThemes.map { it.titleResId }.toTypedArray() + val appThemes = Values.AppTheme.values().filter { it.titleResId != null } + entriesRes = appThemes.map { it.titleResId!! }.toTypedArray() entryValues = appThemes.map { it.name }.toTypedArray() defaultValue = appThemes[0].name summary = "%s" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2cb7af89a..fbc0e9f2d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -153,7 +153,6 @@ Blue Green Apple Midnight Dusk - Hot Pink Pure black dark mode Start screen Language