优化
This commit is contained in:
@@ -238,7 +238,6 @@ data class Book(
|
|||||||
|
|
||||||
fun getImageStyle(): String? {
|
fun getImageStyle(): String? {
|
||||||
return config.imageStyle
|
return config.imageStyle
|
||||||
?: if (isImage || isPdf) imgStyleFull else null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setTtsEngine(ttsEngine: String?) {
|
fun setTtsEngine(ttsEngine: String?) {
|
||||||
|
|||||||
@@ -170,8 +170,7 @@ object ReadBook : CoroutineScope by MainScope() {
|
|||||||
} else {
|
} else {
|
||||||
appDb.bookSourceDao.getBookSource(book.origin)?.let {
|
appDb.bookSourceDao.getBookSource(book.origin)?.let {
|
||||||
bookSource = it
|
bookSource = it
|
||||||
val readConfig = book.readConfig ?: return@let
|
if (book.getImageStyle().isNullOrBlank()) {
|
||||||
if (readConfig.imageStyle.isNullOrBlank()) {
|
|
||||||
var imageStyle = it.getContentRule().imageStyle
|
var imageStyle = it.getContentRule().imageStyle
|
||||||
if (imageStyle.isNullOrBlank() && (book.isImage || book.isPdf)) {
|
if (imageStyle.isNullOrBlank() && (book.isImage || book.isPdf)) {
|
||||||
imageStyle = Book.imgStyleFull
|
imageStyle = Book.imgStyleFull
|
||||||
|
|||||||
Reference in New Issue
Block a user