feat: 优化代码

pull/173/head
kunfei 5 years ago
parent f81b51a523
commit 5c1cba553d
  1. 1
      app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt
  2. 1
      app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt

@ -133,6 +133,7 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
execute {
if (inBookshelf) {
bookData.value?.let {
book.group = it.group
book.order = it.order
App.db.bookDao().delete(it)
}

@ -136,6 +136,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
execute {
ReadBook.upMsg(null)
ReadBook.book?.let {
book1.group = it.group
book1.order = it.order
App.db.bookDao().delete(it)
}

Loading…
Cancel
Save