pull/1284/head
gedoor 3 years ago
parent 7631e05a81
commit 7fe69abf7e
  1. 15
      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) { 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)
}
} }
/** /**

Loading…
Cancel
Save