feat: 优化代码

pull/141/head
kunfei 5 years ago
parent 98135941e6
commit 9566491369
  1. 9
      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 -> {
viewModel.bookData.value?.let { if (viewModel.inBookshelf) {
it.canUpdate = !it.canUpdate viewModel.bookData.value?.let {
it.canUpdate = !it.canUpdate
viewModel.saveBook()
}
} else {
toast(R.string.after_add_bookshelf)
} }
} }
} }

Loading…
Cancel
Save