|
@@ -7,7 +7,6 @@ import android.content.Context
|
|
|
import android.content.pm.ActivityInfo
|
|
import android.content.pm.ActivityInfo
|
|
|
import android.content.res.Configuration
|
|
import android.content.res.Configuration
|
|
|
import android.os.Build
|
|
import android.os.Build
|
|
|
-import com.github.liuyueyi.quick.transfer.ChineseUtils
|
|
|
|
|
import com.github.liuyueyi.quick.transfer.constants.TransType
|
|
import com.github.liuyueyi.quick.transfer.constants.TransType
|
|
|
import com.jeremyliao.liveeventbus.LiveEventBus
|
|
import com.jeremyliao.liveeventbus.LiveEventBus
|
|
|
import io.legado.app.base.AppContextWrapper
|
|
import io.legado.app.base.AppContextWrapper
|
|
@@ -31,6 +30,7 @@ import io.legado.app.help.http.okHttpClient
|
|
|
import io.legado.app.help.source.SourceHelp
|
|
import io.legado.app.help.source.SourceHelp
|
|
|
import io.legado.app.help.storage.Backup
|
|
import io.legado.app.help.storage.Backup
|
|
|
import io.legado.app.model.BookCover
|
|
import io.legado.app.model.BookCover
|
|
|
|
|
+import io.legado.app.utils.ChineseUtils
|
|
|
import io.legado.app.utils.defaultSharedPreferences
|
|
import io.legado.app.utils.defaultSharedPreferences
|
|
|
import io.legado.app.utils.getPrefBoolean
|
|
import io.legado.app.utils.getPrefBoolean
|
|
|
import kotlinx.coroutines.launch
|
|
import kotlinx.coroutines.launch
|
|
@@ -73,7 +73,10 @@ class App : Application() {
|
|
|
Backup.clearCache()
|
|
Backup.clearCache()
|
|
|
//初始化简繁转换引擎
|
|
//初始化简繁转换引擎
|
|
|
when (AppConfig.chineseConverterType) {
|
|
when (AppConfig.chineseConverterType) {
|
|
|
- 1 -> ChineseUtils.preLoad(true, TransType.TRADITIONAL_TO_SIMPLE)
|
|
|
|
|
|
|
+ 1 -> launch {
|
|
|
|
|
+ ChineseUtils.fixT2sDict()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
2 -> ChineseUtils.preLoad(true, TransType.SIMPLE_TO_TRADITIONAL)
|
|
2 -> ChineseUtils.preLoad(true, TransType.SIMPLE_TO_TRADITIONAL)
|
|
|
}
|
|
}
|
|
|
//调整排序序号
|
|
//调整排序序号
|