feat: 修复bug

pull/238/head
gedoor 5 years ago
parent d28d87bfaa
commit fccdf41ea8
  1. 7
      app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt

@ -35,6 +35,10 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
} ?: App.db.bookDao().lastReadBook?.let {
initBook(it)
}
}.onFinally {
if (ReadBook.inBookshelf) {
ReadBook.saveRead()
}
}
}
@ -80,9 +84,6 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
}
}
}
if (ReadBook.inBookshelf) {
ReadBook.saveRead()
}
}
private fun loadBookInfo(

Loading…
Cancel
Save