From 79ddeec20d04cad8e6bf7082bd176afac95504a0 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 13 Dec 2020 09:56:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/BookHelp.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/BookHelp.kt b/app/src/main/java/io/legado/app/help/BookHelp.kt index 6ae431662..6b8dffb31 100644 --- a/app/src/main/java/io/legado/app/help/BookHelp.kt +++ b/app/src/main/java/io/legado/app/help/BookHelp.kt @@ -68,16 +68,16 @@ object BookHelp { content.split("\n").forEach { val matcher = AppPattern.imgPattern.matcher(it) if (matcher.find()) { - var src = matcher.group(1) - src = NetworkUtils.getAbsoluteURL(bookChapter.url, src) - src?.let { - saveImage(book, src) + matcher.group(1)?.let { src -> + val mSrc = NetworkUtils.getAbsoluteURL(bookChapter.url, src) + saveImage(book, mSrc) } } } postEvent(EventBus.SAVE_CONTENT, bookChapter) } + @Suppress("unused") fun saveFont(book: Book, bookChapter: BookChapter, font: ByteArray) { FileUtils.createFileIfNotExist( downloadDir,