添加通用封面规则

pull/1705/head
kunfei 3 years ago
parent 20b02be801
commit be99c79cb3
  1. 2
      app/src/main/java/io/legado/app/ui/config/CoverRuleConfigDialog.kt
  2. 5
      app/src/main/java/io/legado/app/ui/welcome/WelcomeActivity.kt

@ -8,7 +8,7 @@ import io.legado.app.base.BaseDialogFragment
class CoverRuleConfigDialog : BaseDialogFragment(R.layout.dialog_cover_rule_config) {
override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) {
TODO("Not yet implemented")
}
}

@ -13,6 +13,7 @@ import io.legado.app.help.config.AppConfig
import io.legado.app.help.coroutine.Coroutine
import io.legado.app.help.storage.AppWebDav
import io.legado.app.lib.theme.accentColor
import io.legado.app.model.BookCover
import io.legado.app.ui.book.read.ReadBookActivity
import io.legado.app.ui.main.MainActivity
import io.legado.app.utils.*
@ -54,8 +55,10 @@ open class WelcomeActivity : BaseActivity<ActivityWelcomeBinding>() {
}
}
Coroutine.async {
appDb.cacheDao.clearDeadline(System.currentTimeMillis())
//初始化封面
BookCover.toString()
//清除过期数据
appDb.cacheDao.clearDeadline(System.currentTimeMillis())
if (getPrefBoolean(PreferKey.autoClearExpired, true)) {
appDb.searchBookDao
.clearExpired(System.currentTimeMillis() - TimeUnit.DAYS.toMillis(1))

Loading…
Cancel
Save