修改图片绘制

This commit is contained in:
kunfei
2022-04-14 10:08:08 +08:00
parent 4582ca2a85
commit ad86c64ad9
3 changed files with 11 additions and 3 deletions

View File

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

View File

@@ -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) {

View File

@@ -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)
}