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,