remove deprecated auto nightmode

This commit is contained in:
Konrad Pozniak 2020-06-14 21:57:16 +02:00
parent f568a2fc81
commit a77ed67fd9
3 changed files with 4 additions and 10 deletions

View File

@ -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()
}

View File

@ -25,23 +25,20 @@
<string name="key_pref_night_mode">NIGHT_MODE</string>
<string name="key_pref_night_mode_off">OFF</string>
<string name="key_pref_night_mode_on">ON</string>
<string name="key_pref_night_mode_auto">AUTO</string>
<string name="key_pref_night_mode_follow_system">FOLLOW_SYSTEM</string>
<string name="key_pref_night_mode_default">@string/key_pref_night_mode_off</string>
<string name="key_pref_night_mode_default">@string/key_pref_night_mode_follow_system</string>
<string-array name="night_mode_values">
<item>@string/key_pref_night_mode_follow_system</item>
<item>@string/key_pref_night_mode_off</item>
<item>@string/key_pref_night_mode_on</item>
<item>@string/key_pref_night_mode_auto</item>
<item>@string/key_pref_night_mode_follow_system</item>
</string-array>
<string-array name="night_mode_names">
<item>@string/pref_night_mode_follow_system</item>
<item>@string/pref_night_mode_off</item>
<item>@string/pref_night_mode_on</item>
<item>@string/pref_night_mode_auto</item>
<item>@string/pref_night_mode_follow_system</item>
</string-array>
<!-- pure black night mode -->

View File

@ -17,10 +17,9 @@
<string name="pref_title_night_mode">Night mode</string>
<string name="pref_night_mode_follow_system">Follow system</string>
<string name="pref_night_mode_off">Off</string>
<string name="pref_night_mode_on">On</string>
<string name="pref_night_mode_auto">Auto</string>
<string name="pref_night_mode_follow_system">Follow system</string>
<string name="pref_title_black_night_mode">Pure black night mode</string>