pull/1209/head
gedoor 3 years ago
parent eb86074203
commit ea4602b857
  1. 6
      app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt
  2. 2
      app/src/main/java/io/legado/app/ui/main/MainViewModel.kt

@ -47,12 +47,12 @@ class BgTextConfigDialog : BaseDialogFragment() {
private var secondaryTextColor = 0
private val importFormNet = "网络导入"
private val selectBgImage = registerForActivityResult(ActivityResultContracts.GetContent()) {
it ?: return@registerForActivityResult
setBgFromUri(it)
}
private val selectExportDir = registerForActivityResult(FilePicker()) {
it?.let {
exportConfig(it)
}
it ?: return@registerForActivityResult
exportConfig(it)
}
private val selectImportDoc = registerForActivityResult(FilePicker()) {
it ?: return@registerForActivityResult

@ -12,7 +12,6 @@ import io.legado.app.help.DefaultData
import io.legado.app.help.LocalConfig
import io.legado.app.model.webBook.WebBook
import io.legado.app.service.help.CacheBook
import io.legado.app.utils.FileUtils
import io.legado.app.utils.postEvent
import kotlinx.coroutines.asCoroutineDispatcher
import kotlinx.coroutines.delay
@ -143,7 +142,6 @@ class MainViewModel(application: Application) : BaseViewModel(application) {
fun postLoad() {
execute {
FileUtils.deleteFile(FileUtils.getPath(context.cacheDir, "Fonts"))
if (appDb.httpTTSDao.count == 0) {
DefaultData.httpTTS.let {
appDb.httpTTSDao.insert(*it.toTypedArray())

Loading…
Cancel
Save