remove deprecated auto nightmode
This commit is contained in:
parent
f568a2fc81
commit
a77ed67fd9
|
@ -4,7 +4,6 @@ import android.content.Context
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
import androidx.annotation.StyleRes
|
import androidx.annotation.StyleRes
|
||||||
import androidx.appcompat.app.AppCompatDelegate
|
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_FOLLOW_SYSTEM
|
||||||
import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_NO
|
import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_NO
|
||||||
import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_YES
|
import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_YES
|
||||||
|
@ -40,7 +39,6 @@ class AppSettings @Inject constructor (
|
||||||
return when (nightModePref) {
|
return when (nightModePref) {
|
||||||
context.getString(R.string.key_pref_night_mode_off) -> MODE_NIGHT_NO
|
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_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
|
context.getString(R.string.key_pref_night_mode_follow_system) -> MODE_NIGHT_FOLLOW_SYSTEM
|
||||||
else -> throw IllegalStateException()
|
else -> throw IllegalStateException()
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,23 +25,20 @@
|
||||||
<string name="key_pref_night_mode">NIGHT_MODE</string>
|
<string name="key_pref_night_mode">NIGHT_MODE</string>
|
||||||
<string name="key_pref_night_mode_off">OFF</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_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_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">
|
<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_off</item>
|
||||||
<item>@string/key_pref_night_mode_on</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>
|
||||||
|
|
||||||
<string-array name="night_mode_names">
|
<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_off</item>
|
||||||
<item>@string/pref_night_mode_on</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>
|
</string-array>
|
||||||
|
|
||||||
<!-- pure black night mode -->
|
<!-- pure black night mode -->
|
||||||
|
|
|
@ -17,10 +17,9 @@
|
||||||
|
|
||||||
<string name="pref_title_night_mode">Night mode</string>
|
<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_off">Off</string>
|
||||||
<string name="pref_night_mode_on">On</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>
|
<string name="pref_title_black_night_mode">Pure black night mode</string>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue