pull/1284/head
gedoor 3 years ago
parent 7631e05a81
commit 7fe69abf7e
  1. 13
      app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt

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

Loading…
Cancel
Save