diff --git a/app/src/main/java/io/legado/app/App.kt b/app/src/main/java/io/legado/app/App.kt index 93ea305a1..9474efac5 100644 --- a/app/src/main/java/io/legado/app/App.kt +++ b/app/src/main/java/io/legado/app/App.kt @@ -13,6 +13,7 @@ import com.jeremyliao.liveeventbus.LiveEventBus import io.legado.app.constant.AppConst.channelIdDownload import io.legado.app.constant.AppConst.channelIdReadAloud import io.legado.app.constant.AppConst.channelIdWeb +import io.legado.app.constant.EventBus import io.legado.app.constant.PreferKey import io.legado.app.data.AppDatabase import io.legado.app.help.ActivityHelp @@ -22,6 +23,7 @@ import io.legado.app.help.ReadBookConfig import io.legado.app.lib.theme.ThemeStore import io.legado.app.utils.getCompatColor import io.legado.app.utils.getPrefInt +import io.legado.app.utils.postEvent @Suppress("DEPRECATION") class App : Application() { @@ -113,6 +115,7 @@ class App : Application() { ReadBookConfig.upBg() applyTheme() initNightMode() + postEvent(EventBus.RECREATE, "") } private fun initNightMode() { diff --git a/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt b/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt index 88bb95afe..b16cbaf17 100644 --- a/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt @@ -65,6 +65,9 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config), FileChooserDialog. BackupRestoreUi.onActivityResult(requestCode, resultCode, data) } + /** + * 配置 + */ class PreferenceFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedPreferenceChangeListener {