|
|
@ -92,13 +92,10 @@ class CacheViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
.append(context.getString(R.string.author_show, book.author)) |
|
|
|
.append(context.getString(R.string.author_show, book.author)) |
|
|
|
App.db.bookChapterDao().getChapterList(book.bookUrl).forEach { chapter -> |
|
|
|
App.db.bookChapterDao().getChapterList(book.bookUrl).forEach { chapter -> |
|
|
|
BookHelp.getContent(book, chapter).let { content -> |
|
|
|
BookHelp.getContent(book, chapter).let { content -> |
|
|
|
val content1 = content?.let { |
|
|
|
val content1 = contentProcessor |
|
|
|
contentProcessor.getContent(book, chapter.title, it, false) |
|
|
|
.getContent(book, chapter.title, content ?: "", false) |
|
|
|
.joinToString("\n") |
|
|
|
.joinToString("\n") |
|
|
|
} |
|
|
|
|
|
|
|
stringBuilder.append("\n\n") |
|
|
|
stringBuilder.append("\n\n") |
|
|
|
.append(chapter.title) |
|
|
|
|
|
|
|
.append("\n") |
|
|
|
|
|
|
|
.append(content1) |
|
|
|
.append(content1) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|