Simplify locale override (#5509)

This commit is contained in:
Ivan Iskandar
2021-07-08 05:11:52 +07:00
committed by GitHub
parent 49cdcc644c
commit 37d30eb887
6 changed files with 45 additions and 110 deletions
@@ -232,11 +232,7 @@ class SettingsGeneralController : SettingsController() {
summary = "%s"
onChange { newValue ->
val activity = activity ?: return@onChange false
val app = activity.application
LocaleHelper.changeLocale(newValue.toString())
LocaleHelper.updateConfiguration(app, app.resources.configuration)
activity.recreate()
activity?.recreate()
true
}
}