From a052c8f0e6c6da1cdd19105c2b2baeed09511783 Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 13 Jul 2022 20:27:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/book/search/HistoryKeyAdapter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/search/HistoryKeyAdapter.kt b/app/src/main/java/io/legado/app/ui/book/search/HistoryKeyAdapter.kt index 731689762..355e54022 100644 --- a/app/src/main/java/io/legado/app/ui/book/search/HistoryKeyAdapter.kt +++ b/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) { holder.itemView.apply { setOnClickListener { - getItem(holder.layoutPosition)?.let { + getItemByLayoutPosition(holder.layoutPosition)?.let { callBack.searchHistory(it.word) } } onLongClick { explosionField.explode(this, true) - getItem(holder.layoutPosition)?.let { + getItemByLayoutPosition(holder.layoutPosition)?.let { callBack.deleteHistory(it) } }