|
|
|
@ -31,10 +31,9 @@ class BookshelfViewModel(application: Application) : BaseViewModel(application) |
|
|
|
|
|
|
|
|
|
fun upChapterList() { |
|
|
|
|
execute { |
|
|
|
|
App.db.bookDao().getRecentRead().map { book -> |
|
|
|
|
App.db.bookDao().getRecentRead().forEach { book -> |
|
|
|
|
if (book.origin != BookType.local) { |
|
|
|
|
val bookSource = App.db.bookSourceDao().getBookSource(book.origin) |
|
|
|
|
bookSource?.let { |
|
|
|
|
App.db.bookSourceDao().getBookSource(book.origin)?.let { bookSource -> |
|
|
|
|
synchronized(this) { |
|
|
|
|
updateList.add(book.bookUrl) |
|
|
|
|
postEvent(Bus.UP_BOOK, book.bookUrl) |
|
|
|
|