fix(epub): reset ReadConfig.useReplaceRule to false

fix #1831
pull/1937/head
Xwite 2 years ago
parent fc6745b6fe
commit 99835dfc17
  1. 3
      app/src/main/java/io/legado/app/data/entities/Book.kt
  2. 2
      app/src/main/java/io/legado/app/model/localBook/EpubFile.kt

@ -202,7 +202,8 @@ data class Book(
if (useReplaceRule != null) {
return useReplaceRule
}
if (type == BookType.image) {
//图片类书源 epub本地 默认关闭净化
if (type == BookType.image || isEpub()) {
return false
}
return AppConfig.replaceEnableDefault

@ -33,7 +33,7 @@ class EpubFile(var book: Book) {
if (eFile == null || eFile?.book?.bookUrl != book.bookUrl) {
eFile = EpubFile(book)
//对于Epub文件默认不启用替换
book.setUseReplaceRule(false)
//io.legado.app.data.entities.Book getUseReplaceRule
return eFile!!
}
eFile?.book = book

Loading…
Cancel
Save