len 8 жил өмнө
parent
commit
e3d430eb5e

+ 1 - 1
app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt

@@ -15,7 +15,7 @@ fun <T> Preference<T>.getOrDefault(): T = get() ?: defaultValue()!!
 
 fun Preference<Boolean>.invert(): Boolean = getOrDefault().let { set(!it); !it }
 
-class PreferencesHelper(context: Context) {
+class PreferencesHelper(val context: Context) {
 
     val keys = PreferenceKeys(context)
 

+ 1 - 1
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)
         }