From b3965bf8507fb7c1fdf165828cefcc62f3ef7448 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 23 Nov 2019 18:42:18 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/ui/book/info/BookInfoActivity.kt | 2 +- .../main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt | 2 +- 2 files changed, 2 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 4d74cc0bb..aa18be7c8 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 @@ -255,7 +255,7 @@ class BookInfoActivity : VMBaseActivity(R.layout.activity_boo viewModel.groupData.postValue(group) viewModel.bookData.value?.group = group.groupId if (viewModel.inBookshelf) { - viewModel.saveBook { } + viewModel.saveBook() } } diff --git a/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt b/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt index 7673458de..bace352ff 100644 --- a/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt @@ -148,7 +148,7 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) { } } - fun saveBook(success: (() -> Unit)?) { + fun saveBook(success: (() -> Unit)? = null) { execute { bookData.value?.let { book -> App.db.bookDao().insert(book)