From 3552ced2ee4ea668b787e3cf8b059ad3a461412d Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 13 Aug 2020 21:12:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BA=94=E7=94=A8=E5=86=85?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/App.kt | 1 + app/src/main/java/io/legado/app/help/storage/Restore.kt | 1 + app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt | 1 + 3 files changed, 3 insertions(+) diff --git a/app/src/main/java/io/legado/app/App.kt b/app/src/main/java/io/legado/app/App.kt index c8cd2620c..a913a354c 100644 --- a/app/src/main/java/io/legado/app/App.kt +++ b/app/src/main/java/io/legado/app/App.kt @@ -43,6 +43,7 @@ class App : MultiDexApplication() { super.onCreate() INSTANCE = this CrashHandler().init(this) + LanguageUtils.setConfiguration(this) db = AppDatabase.createDatabase(INSTANCE) packageManager.getPackageInfo(packageName, 0)?.let { versionCode = it.versionCode diff --git a/app/src/main/java/io/legado/app/help/storage/Restore.kt b/app/src/main/java/io/legado/app/help/storage/Restore.kt index 1b5b1603d..ac63fe28b 100644 --- a/app/src/main/java/io/legado/app/help/storage/Restore.kt +++ b/app/src/main/java/io/legado/app/help/storage/Restore.kt @@ -188,6 +188,7 @@ object Restore { if (!BuildConfig.DEBUG) { LauncherIconHelp.changeIcon(App.INSTANCE.getPrefString(PreferKey.launcherIcon)) } + LanguageUtils.setConfiguration(App.INSTANCE) App.INSTANCE.applyDayNight() postEvent(EventBus.SHOW_RSS, "") postEvent(EventBus.RECREATE, "") diff --git a/app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt index e95414af2..e2836e688 100644 --- a/app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt @@ -118,6 +118,7 @@ class OtherConfigFragment : BasePreferenceFragment(), PreferKey.replaceEnableDefault -> AppConfig.replaceEnableDefault = App.INSTANCE.getPrefBoolean(PreferKey.replaceEnableDefault, true) PreferKey.language -> { + LanguageUtils.setConfiguration(App.INSTANCE) postEvent(EventBus.RECREATE, "") } }