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 a7ad902bb..850724743 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 @@ -16,6 +16,7 @@ import io.legado.app.service.help.ReadBook import io.legado.app.ui.book.read.page.ChapterProvider import io.legado.app.utils.* import kotlinx.coroutines.Dispatchers.IO +import kotlinx.coroutines.Dispatchers.Main import kotlinx.coroutines.withContext import org.jetbrains.anko.defaultSharedPreferences import java.io.File @@ -108,7 +109,6 @@ object Restore { edit.putInt(PreferKey.versionCode, App.INSTANCE.versionCode) edit.apply() } - App.INSTANCE.applyDayNight() ReadBookConfig.apply { styleSelect = App.INSTANCE.getPrefInt(PreferKey.readStyleSelect) shareLayout = App.INSTANCE.getPrefBoolean(PreferKey.shareLayout) @@ -119,6 +119,9 @@ object Restore { } ChapterProvider.upStyle() ReadBook.loadContent() + withContext(Main) { + App.INSTANCE.applyDayNight() + } } LauncherIconHelp.changeIcon(App.INSTANCE.getPrefString(PreferKey.launcherIcon)) }