From 95664913698c1a008db9987852d0c41393c08f33 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 7 Mar 2020 11:39:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/book/info/BookInfoActivity.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt b/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt index 621a41fa9..769b47b21 100644 --- a/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt @@ -86,8 +86,13 @@ class BookInfoActivity : } } R.id.menu_can_update -> { - viewModel.bookData.value?.let { - it.canUpdate = !it.canUpdate + if (viewModel.inBookshelf) { + viewModel.bookData.value?.let { + it.canUpdate = !it.canUpdate + viewModel.saveBook() + } + } else { + toast(R.string.after_add_bookshelf) } } }