From 6098260f4533f1e22b1e217292c15660befa3508 Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Wed, 1 Jun 2022 18:27:34 +0800 Subject: [PATCH] feat(ImageProvider): disable replace when detect empty image url --- .../io/legado/app/ui/book/read/page/provider/ImageProvider.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/provider/ImageProvider.kt b/app/src/main/java/io/legado/app/ui/book/read/page/provider/ImageProvider.kt index bf9954da3..19dd436f0 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/provider/ImageProvider.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/provider/ImageProvider.kt @@ -114,6 +114,7 @@ object ImageProvider { ): Bitmap { //src为空白时 可能被净化替换掉了 或者规则失效 if (book.getUseReplaceRule() && src.isBlank()) { + book.setUseReplaceRule(false) appCtx.toastOnUi(R.string.error_image_url_empty) } val vFile = BookHelp.getImage(book, src)