优化代码

pull/743/head
gedoor 4 years ago
parent 7aa72733bd
commit 21f12fbc95
  1. 8
      app/src/main/java/io/legado/app/ui/book/search/SearchAdapter.kt

@ -66,11 +66,9 @@ class SearchAdapter(context: Context, val callBack: CallBack) :
}
override fun registerListener(holder: ItemViewHolder, binding: ItemSearchBinding) {
holder.itemView.apply {
onClick {
getItem(holder.layoutPosition)?.let {
callBack.showBookInfo(it.name, it.author)
}
binding.root.onClick {
getItem(holder.layoutPosition)?.let {
callBack.showBookInfo(it.name, it.author)
}
}
}

Loading…
Cancel
Save