feat: 优化代码

pull/141/head
kunfei 5 years ago
parent 98135941e6
commit 9566491369
  1. 5
      app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt

@ -86,8 +86,13 @@ class BookInfoActivity :
} }
} }
R.id.menu_can_update -> { R.id.menu_can_update -> {
if (viewModel.inBookshelf) {
viewModel.bookData.value?.let { viewModel.bookData.value?.let {
it.canUpdate = !it.canUpdate it.canUpdate = !it.canUpdate
viewModel.saveBook()
}
} else {
toast(R.string.after_add_bookshelf)
} }
} }
} }

Loading…
Cancel
Save