From d0374904a1015b47111f020e3ccd861217be6d62 Mon Sep 17 00:00:00 2001 From: gedoor Date: Wed, 16 Dec 2020 11:43:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../legado/app/ui/book/search/SearchAdapter.kt | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/search/SearchAdapter.kt b/app/src/main/java/io/legado/app/ui/book/search/SearchAdapter.kt index 732a5de4e..8041d54e3 100644 --- a/app/src/main/java/io/legado/app/ui/book/search/SearchAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/search/SearchAdapter.kt @@ -3,9 +3,8 @@ package io.legado.app.ui.book.search import android.content.Context import android.os.Bundle import android.view.ViewGroup -import androidx.recyclerview.widget.DiffUtil import io.legado.app.R -import io.legado.app.base.adapter.DiffRecyclerAdapter +import io.legado.app.base.adapter.CommonRecyclerAdapter import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.data.entities.SearchBook import io.legado.app.databinding.ItemSearchBinding @@ -14,19 +13,7 @@ import io.legado.app.utils.visible import org.jetbrains.anko.sdk27.listeners.onClick class SearchAdapter(context: Context, val callBack: CallBack) : - DiffRecyclerAdapter(context) { - - override val diffItemCallback: DiffUtil.ItemCallback - get() = object : DiffUtil.ItemCallback() { - - override fun areContentsTheSame(oldItem: SearchBook, newItem: SearchBook): Boolean { - return true - } - - override fun areItemsTheSame(oldItem: SearchBook, newItem: SearchBook): Boolean { - return false - } - } + CommonRecyclerAdapter(context) { override fun getViewBinding(parent: ViewGroup): ItemSearchBinding { return ItemSearchBinding.inflate(inflater, parent, false)