From e82fabc2a5d4382eace08e8bf4574c210b7a990f Mon Sep 17 00:00:00 2001 From: gedoor Date: Mon, 16 Nov 2020 10:39:53 +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 --- .../java/io/legado/app/ui/book/cache/CacheViewModel.kt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt b/app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt index 86e57fb68..1940218f5 100644 --- a/app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt @@ -92,13 +92,10 @@ class CacheViewModel(application: Application) : BaseViewModel(application) { .append(context.getString(R.string.author_show, book.author)) App.db.bookChapterDao().getChapterList(book.bookUrl).forEach { chapter -> BookHelp.getContent(book, chapter).let { content -> - val content1 = content?.let { - contentProcessor.getContent(book, chapter.title, it, false) - .joinToString("\n") - } + val content1 = contentProcessor + .getContent(book, chapter.title, content ?: "", false) + .joinToString("\n") stringBuilder.append("\n\n") - .append(chapter.title) - .append("\n") .append(content1) } }