修改图片绘制
This commit is contained in:
@@ -31,7 +31,7 @@ object AppLog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun putDebug(message: String?, throwable: Throwable? = null) {
|
fun putDebug(message: String?, throwable: Throwable? = null) {
|
||||||
if (AppConfig.recordLog) {
|
if (AppConfig.recordLog || BuildConfig.DEBUG) {
|
||||||
put(message, throwable)
|
put(message, throwable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,7 +193,14 @@ data class Book(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun getUseReplaceRule(): Boolean {
|
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) {
|
fun setReSegment(reSegment: Boolean) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package io.legado.app.help
|
package io.legado.app.help
|
||||||
|
|
||||||
|
import io.legado.app.constant.AppLog
|
||||||
import io.legado.app.constant.AppPattern
|
import io.legado.app.constant.AppPattern
|
||||||
import io.legado.app.constant.EventBus
|
import io.legado.app.constant.EventBus
|
||||||
import io.legado.app.data.appDb
|
import io.legado.app.data.appDb
|
||||||
@@ -126,7 +127,7 @@ object BookHelp {
|
|||||||
).writeBytes(it)
|
).writeBytes(it)
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
e.printOnDebug()
|
AppLog.putDebug("${src}下载错误", e)
|
||||||
} finally {
|
} finally {
|
||||||
downloadImages.remove(src)
|
downloadImages.remove(src)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user