feat: 优化代码

pull/105/head
kunfei 5 years ago
parent c8179fa59a
commit 619c9eb887
  1. 7
      app/src/main/java/io/legado/app/ui/download/DownloadViewModel.kt

@ -50,8 +50,11 @@ class DownloadViewModel(application: Application) : BaseViewModel(application) {
.append("\n")
.append(context.getString(R.string.author_show, book.author))
App.db.bookChapterDao().getChapterList(book.bookUrl).forEach { chapter ->
BookHelp.getContent(book, chapter)?.let {
stringBuilder.append("\n").append(it)
BookHelp.getContent(book, chapter).let {
stringBuilder.append("\n\n")
.append(chapter.title)
.append("\n")
.append(it)
}
}
return stringBuilder.toString()

Loading…
Cancel
Save