diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt index 9c79c4218..65873180f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt @@ -15,7 +15,7 @@ fun Preference.getOrDefault(): T = get() ?: defaultValue()!! fun Preference.invert(): Boolean = getOrDefault().let { set(!it); !it } -class PreferencesHelper(context: Context) { +class PreferencesHelper(val context: Context) { val keys = PreferenceKeys(context) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/LocaleHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/util/LocaleHelper.kt index 1850bad24..5177137ff 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/LocaleHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/LocaleHelper.kt @@ -21,7 +21,7 @@ object LocaleHelper { fun updateCfg(wrapper: ContextThemeWrapper) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { - val config = Configuration() + val config = Configuration(preferences.context.resources.configuration) config.setLocale(pLocale) wrapper.applyOverrideConfiguration(config) }