Skip to content

Commit

Permalink
修改因getImageStyle方法中默认书源为图片格式返回imgStyleFull导致书源imgstyle配置不生效的问题 (gedoo…
Browse files Browse the repository at this point in the history
…r#4530)

Co-authored-by: SunQAQ <[email protected]>
  • Loading branch information
Sun-QAQ and SunQAQ authored Jan 14, 2025
1 parent 936fe59 commit 64f7761
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/src/main/java/io/legado/app/model/ReadBook.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import io.legado.app.help.book.BookHelp
import io.legado.app.help.book.ContentProcessor
import io.legado.app.help.book.isImage
import io.legado.app.help.book.isLocal
import io.legado.app.help.book.isPdf
import io.legado.app.help.book.readSimulating
import io.legado.app.help.book.simulatedTotalChapterNum
import io.legado.app.help.book.update
Expand Down Expand Up @@ -169,8 +170,12 @@ object ReadBook : CoroutineScope by MainScope() {
} else {
appDb.bookSourceDao.getBookSource(book.origin)?.let {
bookSource = it
if (book.getImageStyle().isNullOrBlank()) {
val imageStyle = it.getContentRule().imageStyle
val readConfig = book.readConfig ?: return@let
if (readConfig.imageStyle.isNullOrBlank()) {
var imageStyle = it.getContentRule().imageStyle
if (imageStyle.isNullOrBlank() && (book.isImage || book.isPdf)) {
imageStyle = Book.imgStyleFull
}
book.setImageStyle(imageStyle)
if (imageStyle.equals(Book.imgStyleSingle, true)) {
book.setPageAnim(0)
Expand Down

0 comments on commit 64f7761

Please sign in to comment.