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)