|
|
@ -50,8 +50,11 @@ class DownloadViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
.append("\n") |
|
|
|
.append("\n") |
|
|
|
.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 { |
|
|
|
BookHelp.getContent(book, chapter).let { |
|
|
|
stringBuilder.append("\n").append(it) |
|
|
|
stringBuilder.append("\n\n") |
|
|
|
|
|
|
|
.append(chapter.title) |
|
|
|
|
|
|
|
.append("\n") |
|
|
|
|
|
|
|
.append(it) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return stringBuilder.toString() |
|
|
|
return stringBuilder.toString() |
|
|
|