|
|
@ -334,13 +334,9 @@ class SearchActivity : VMBaseActivity<ActivityBookSearchBinding, SearchViewModel |
|
|
|
* 显示书籍详情 |
|
|
|
* 显示书籍详情 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
override fun showBookInfo(name: String, author: String) { |
|
|
|
override fun showBookInfo(name: String, author: String) { |
|
|
|
viewModel.getSearchBook(name, author) { searchBook -> |
|
|
|
startActivity<BookInfoActivity> { |
|
|
|
searchBook?.let { |
|
|
|
putExtra("name", name) |
|
|
|
startActivity<BookInfoActivity> { |
|
|
|
putExtra("author", author) |
|
|
|
putExtra("name", it.name) |
|
|
|
|
|
|
|
putExtra("author", it.author) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -348,10 +344,7 @@ class SearchActivity : VMBaseActivity<ActivityBookSearchBinding, SearchViewModel |
|
|
|
* 显示书籍详情 |
|
|
|
* 显示书籍详情 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
override fun showBookInfo(book: Book) { |
|
|
|
override fun showBookInfo(book: Book) { |
|
|
|
startActivity<BookInfoActivity> { |
|
|
|
showBookInfo(book.name, book.author) |
|
|
|
putExtra("name", book.name) |
|
|
|
|
|
|
|
putExtra("author", book.author) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|