@ -42,6 +42,9 @@ interface BookDao {
@Query("SELECT * FROM books ORDER BY durChapterTime DESC limit 0,10")
fun recentRead(): DataSource.Factory<Int, Book>
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 {