From e3d430eb5e7c31ad57a0f5a944b1f6967f3f8b35 Mon Sep 17 00:00:00 2001 From: len Date: Sun, 18 Dec 2016 22:31:20 +0100 Subject: [PATCH] Fix #587 --- .../eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt | 2 +- app/src/main/java/eu/kanade/tachiyomi/util/LocaleHelper.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 9c79c4218b..65873180f5 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 1850bad249..5177137ff8 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) }