pull/32/head
kunfei 5 years ago
parent c33f72b15c
commit d0f3702248
  1. 3
      app/src/main/java/io/legado/app/data/dao/BookDao.kt
  2. 8
      app/src/main/java/io/legado/app/ui/main/bookshelf/BookshelfViewModel.kt

@ -42,6 +42,9 @@ interface BookDao {
@Query("SELECT * FROM books ORDER BY durChapterTime DESC limit 0,10")
fun recentRead(): DataSource.Factory<Int, Book>
@Query("SELECT * FROM books ORDER BY durChapterTime DESC limit 0,10")
fun getRecentRead(): DataSource.Factory<Int, Book>
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun insert(vararg books: Book)

@ -20,4 +20,12 @@ class BookshelfViewModel(application: Application) : BaseViewModel(application)
}
}
fun upChapterList() {
execute {
App.db.bookDao().getRecentRead().map {
}
}
}
}

Loading…
Cancel
Save