pull/2072/head
kunfei 2 years ago
parent f15650114a
commit a052c8f0e6
  1. 4
      app/src/main/java/io/legado/app/ui/book/search/HistoryKeyAdapter.kt

@ -35,13 +35,13 @@ class HistoryKeyAdapter(activity: SearchActivity, val callBack: CallBack) :
override fun registerListener(holder: ItemViewHolder, binding: ItemFilletTextBinding) { override fun registerListener(holder: ItemViewHolder, binding: ItemFilletTextBinding) {
holder.itemView.apply { holder.itemView.apply {
setOnClickListener { setOnClickListener {
getItem(holder.layoutPosition)?.let { getItemByLayoutPosition(holder.layoutPosition)?.let {
callBack.searchHistory(it.word) callBack.searchHistory(it.word)
} }
} }
onLongClick { onLongClick {
explosionField.explode(this, true) explosionField.explode(this, true)
getItem(holder.layoutPosition)?.let { getItemByLayoutPosition(holder.layoutPosition)?.let {
callBack.deleteHistory(it) callBack.deleteHistory(it)
} }
} }

Loading…
Cancel
Save