Merge pull request #105 from hingbong/master

用协程异步初始化简繁体转换引擎
pull/106/head
kunfei 5 years ago committed by GitHub
commit a7eefac6a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      app/src/main/java/io/legado/app/ui/main/MainActivity.kt

@ -16,6 +16,7 @@ import io.legado.app.base.VMBaseActivity
import io.legado.app.constant.EventBus import io.legado.app.constant.EventBus
import io.legado.app.constant.PreferKey import io.legado.app.constant.PreferKey
import io.legado.app.help.AppConfig import io.legado.app.help.AppConfig
import io.legado.app.help.coroutine.Coroutine
import io.legado.app.help.storage.Backup import io.legado.app.help.storage.Backup
import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ATH
import io.legado.app.service.BaseReadAloudService import io.legado.app.service.BaseReadAloudService
@ -54,8 +55,8 @@ class MainActivity : VMBaseActivity<MainViewModel>(R.layout.activity_main),
upVersion() upVersion()
//初始化简繁转换引擎 //初始化简繁转换引擎
when (AppConfig.chineseConverterType) { when (AppConfig.chineseConverterType) {
1 -> ZhConverterUtil.toSimple("初始化") 1 -> Coroutine.async { ZhConverterUtil.toSimple("初始化") }
2 -> ZhConverterUtil.toTraditional("初始化") 2 -> Coroutine.async { ZhConverterUtil.toTraditional("初始化") }
} }
//自动更新书籍 //自动更新书籍
if (AppConfig.autoRefreshBook) { if (AppConfig.autoRefreshBook) {

Loading…
Cancel
Save