mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-11 21:20:50 +01:00
Fix #587
This commit is contained in:
parent
fd76255cf6
commit
e3d430eb5e
2 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ fun <T> Preference<T>.getOrDefault(): T = get() ?: defaultValue()!!
|
||||||
|
|
||||||
fun Preference<Boolean>.invert(): Boolean = getOrDefault().let { set(!it); !it }
|
fun Preference<Boolean>.invert(): Boolean = getOrDefault().let { set(!it); !it }
|
||||||
|
|
||||||
class PreferencesHelper(context: Context) {
|
class PreferencesHelper(val context: Context) {
|
||||||
|
|
||||||
val keys = PreferenceKeys(context)
|
val keys = PreferenceKeys(context)
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ object LocaleHelper {
|
||||||
|
|
||||||
fun updateCfg(wrapper: ContextThemeWrapper) {
|
fun updateCfg(wrapper: ContextThemeWrapper) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
||||||
val config = Configuration()
|
val config = Configuration(preferences.context.resources.configuration)
|
||||||
config.setLocale(pLocale)
|
config.setLocale(pLocale)
|
||||||
wrapper.applyOverrideConfiguration(config)
|
wrapper.applyOverrideConfiguration(config)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue