From a77ed67fd9a8bba0f466173b288fe0fa695bb49d Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Sun, 14 Jun 2020 21:57:16 +0200 Subject: [PATCH] remove deprecated auto nightmode --- .../pixelcat/components/settings/AppSettings.kt | 2 -- app/src/main/res/values/preference_constants.xml | 9 +++------ app/src/main/res/values/strings.xml | 3 +-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/app/src/main/kotlin/at/connyduck/pixelcat/components/settings/AppSettings.kt b/app/src/main/kotlin/at/connyduck/pixelcat/components/settings/AppSettings.kt index d87711e..f4bf376 100644 --- a/app/src/main/kotlin/at/connyduck/pixelcat/components/settings/AppSettings.kt +++ b/app/src/main/kotlin/at/connyduck/pixelcat/components/settings/AppSettings.kt @@ -4,7 +4,6 @@ import android.content.Context import android.content.SharedPreferences import androidx.annotation.StyleRes import androidx.appcompat.app.AppCompatDelegate -import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_AUTO_TIME import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_NO import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_YES @@ -40,7 +39,6 @@ class AppSettings @Inject constructor ( return when (nightModePref) { context.getString(R.string.key_pref_night_mode_off) -> MODE_NIGHT_NO context.getString(R.string.key_pref_night_mode_on) -> MODE_NIGHT_YES - context.getString(R.string.key_pref_night_mode_auto) -> MODE_NIGHT_AUTO_TIME context.getString(R.string.key_pref_night_mode_follow_system) -> MODE_NIGHT_FOLLOW_SYSTEM else -> throw IllegalStateException() } diff --git a/app/src/main/res/values/preference_constants.xml b/app/src/main/res/values/preference_constants.xml index a9f838a..e59f9a5 100644 --- a/app/src/main/res/values/preference_constants.xml +++ b/app/src/main/res/values/preference_constants.xml @@ -25,23 +25,20 @@ NIGHT_MODE OFF ON - AUTO FOLLOW_SYSTEM - @string/key_pref_night_mode_off + @string/key_pref_night_mode_follow_system + @string/key_pref_night_mode_follow_system @string/key_pref_night_mode_off @string/key_pref_night_mode_on - @string/key_pref_night_mode_auto - @string/key_pref_night_mode_follow_system + @string/pref_night_mode_follow_system @string/pref_night_mode_off @string/pref_night_mode_on - @string/pref_night_mode_auto - @string/pref_night_mode_follow_system diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6d370f6..c07ad13 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -17,10 +17,9 @@ Night mode + Follow system Off On - Auto - Follow system Pure black night mode