|
|
@ -166,10 +166,16 @@ class BookInfoActivity : VMBaseActivity<BookInfoViewModel>(R.layout.activity_boo |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
tv_shelf.onClick { |
|
|
|
tv_shelf.onClick { |
|
|
|
|
|
|
|
if (viewModel.inBookshelf) { |
|
|
|
|
|
|
|
viewModel.delBook { |
|
|
|
|
|
|
|
tv_shelf.text = getString(R.string.add_to_shelf) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
viewModel.saveBook { |
|
|
|
viewModel.saveBook { |
|
|
|
tv_shelf.text = getString(R.string.remove_from_bookshelf) |
|
|
|
tv_shelf.text = getString(R.string.remove_from_bookshelf) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
tv_loading.onClick { } |
|
|
|
tv_loading.onClick { } |
|
|
|
tv_origin.onClick { |
|
|
|
tv_origin.onClick { |
|
|
|
viewModel.bookData.value?.let { |
|
|
|
viewModel.bookData.value?.let { |
|
|
|