Minor code cleanup
This commit is contained in:
@@ -9,7 +9,7 @@ import android.view.ContextThemeWrapper
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import java.util.*
|
||||
import java.util.Locale
|
||||
|
||||
/**
|
||||
* Utility class to change the application's language in runtime.
|
||||
@@ -90,7 +90,7 @@ object LocaleHelper {
|
||||
* Updates the app's language to an activity.
|
||||
*/
|
||||
fun updateConfiguration(wrapper: ContextThemeWrapper) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && appLocale != null) {
|
||||
if (appLocale != null) {
|
||||
val config = Configuration(preferences.context.resources.configuration)
|
||||
config.setLocale(appLocale)
|
||||
wrapper.applyOverrideConfiguration(config)
|
||||
|
||||
Reference in New Issue
Block a user