修改图片绘制

pull/1785/head
kunfei 2 years ago
parent 4582ca2a85
commit ad86c64ad9
  1. 2
      app/src/main/java/io/legado/app/constant/AppLog.kt
  2. 9
      app/src/main/java/io/legado/app/data/entities/Book.kt
  3. 3
      app/src/main/java/io/legado/app/help/BookHelp.kt

@ -31,7 +31,7 @@ object AppLog {
}
fun putDebug(message: String?, throwable: Throwable? = null) {
if (AppConfig.recordLog) {
if (AppConfig.recordLog || BuildConfig.DEBUG) {
put(message, throwable)
}
}

@ -193,7 +193,14 @@ data class Book(
}
fun getUseReplaceRule(): Boolean {
return config.useReplaceRule ?: AppConfig.replaceEnableDefault
val useReplaceRule = config.useReplaceRule
if (useReplaceRule != null) {
return useReplaceRule
}
if (type == BookType.image) {
return false
}
return AppConfig.replaceEnableDefault
}
fun setReSegment(reSegment: Boolean) {

@ -1,5 +1,6 @@
package io.legado.app.help
import io.legado.app.constant.AppLog
import io.legado.app.constant.AppPattern
import io.legado.app.constant.EventBus
import io.legado.app.data.appDb
@ -126,7 +127,7 @@ object BookHelp {
).writeBytes(it)
}
} catch (e: Exception) {
e.printOnDebug()
AppLog.putDebug("${src}下载错误", e)
} finally {
downloadImages.remove(src)
}

Loading…
Cancel
Save