From 786f244568b69cbd90a6adb9149065767c50d8db Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 3 Dec 2019 15:50:52 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/data/dao/BookDao.kt | 2 +- .../java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/data/dao/BookDao.kt b/app/src/main/java/io/legado/app/data/dao/BookDao.kt index 71a8651b3..482be53e9 100644 --- a/app/src/main/java/io/legado/app/data/dao/BookDao.kt +++ b/app/src/main/java/io/legado/app/data/dao/BookDao.kt @@ -33,7 +33,7 @@ interface BookDao { fun getBook(bookUrl: String): Book? @get:Query("SELECT * FROM books where origin <> '${BookType.local}'") - val webBooks: List + val hasUpdateBooks: List @get:Query("SELECT * FROM books") val allBooks: List diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt index 7f116694e..806cff675 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt @@ -35,7 +35,7 @@ class BookshelfViewModel(application: Application) : BaseViewModel(application) fun downloadAll() { execute { - App.db.bookDao().webBooks.forEach { book -> + App.db.bookDao().hasUpdateBooks.forEach { book -> Download.start(context, book.bookUrl, book.durChapterIndex, book.totalChapterNum) } }