mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-13 12:38:58 +01:00
Fix locale not applied outside activities
This commit is contained in:
@@ -6,7 +6,7 @@ import eu.kanade.tachiyomi.util.LocaleHelper
|
||||
abstract class BaseActivity : AppCompatActivity(), ActivityMixin {
|
||||
|
||||
init {
|
||||
LocaleHelper.updateCfg(this)
|
||||
LocaleHelper.updateConfiguration(this)
|
||||
}
|
||||
|
||||
override fun getActivity() = this
|
||||
|
||||
@@ -9,7 +9,7 @@ import nucleus.view.NucleusAppCompatActivity
|
||||
abstract class BaseRxActivity<P : BasePresenter<*>> : NucleusAppCompatActivity<P>(), ActivityMixin {
|
||||
|
||||
init {
|
||||
LocaleHelper.updateCfg(this)
|
||||
LocaleHelper.updateConfiguration(this)
|
||||
}
|
||||
|
||||
override fun onCreate(savedState: Bundle?) {
|
||||
|
||||
@@ -115,7 +115,8 @@ class SettingsGeneralFragment : SettingsFragment(),
|
||||
langPreference.setOnPreferenceChangeListener { preference, newValue ->
|
||||
(activity as SettingsActivity).parentFlags = SettingsActivity.FLAG_LANG_CHANGED
|
||||
LocaleHelper.changeLocale(newValue.toString())
|
||||
LocaleHelper.updateCfg(activity.application, activity.baseContext.resources.configuration)
|
||||
val app = activity.application
|
||||
LocaleHelper.updateConfiguration(app, app.resources.configuration)
|
||||
activity.recreate()
|
||||
true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user