From 684e6eaea4637a619e96d471750c8735d2af088d Mon Sep 17 00:00:00 2001 From: Horis <8674809+821938089@users.noreply.github.com> Date: Tue, 14 Jan 2025 12:54:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/data/entities/Book.kt | 1 - app/src/main/java/io/legado/app/model/ReadBook.kt | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/data/entities/Book.kt b/app/src/main/java/io/legado/app/data/entities/Book.kt index 8920e869f072..9e4a8296f1d3 100644 --- a/app/src/main/java/io/legado/app/data/entities/Book.kt +++ b/app/src/main/java/io/legado/app/data/entities/Book.kt @@ -238,7 +238,6 @@ data class Book( fun getImageStyle(): String? { return config.imageStyle - ?: if (isImage || isPdf) imgStyleFull else null } fun setTtsEngine(ttsEngine: String?) { diff --git a/app/src/main/java/io/legado/app/model/ReadBook.kt b/app/src/main/java/io/legado/app/model/ReadBook.kt index 35c3c9c8e647..c400180d159f 100644 --- a/app/src/main/java/io/legado/app/model/ReadBook.kt +++ b/app/src/main/java/io/legado/app/model/ReadBook.kt @@ -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