Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
821938089 committed Jan 14, 2025
1 parent 64f7761 commit 684e6ea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion app/src/main/java/io/legado/app/data/entities/Book.kt
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ data class Book(

fun getImageStyle(): String? {
return config.imageStyle
?: if (isImage || isPdf) imgStyleFull else null
}

fun setTtsEngine(ttsEngine: String?) {
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/java/io/legado/app/model/ReadBook.kt
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ object ReadBook : CoroutineScope by MainScope() {
} else {
appDb.bookSourceDao.getBookSource(book.origin)?.let {
bookSource = it
val readConfig = book.readConfig ?: return@let
if (readConfig.imageStyle.isNullOrBlank()) {
if (book.getImageStyle().isNullOrBlank()) {
var imageStyle = it.getContentRule().imageStyle
if (imageStyle.isNullOrBlank() && (book.isImage || book.isPdf)) {
imageStyle = Book.imgStyleFull
Expand Down

0 comments on commit 684e6ea

Please sign in to comment.