Open liukepeng opened 2 years ago
如下
class ConvAdapter : MultiTypeAdapter() {
private val asyncListDiffer: AsyncListDiffer
override fun areContentsTheSame(oldItem: Any, newItem: Any): Boolean {
return if (oldItem is ConvBean && newItem is ConvBean) oldItem == newItem
else if (oldItem::class == newItem::class) true
else false
}
})
fun submitList(list: List<Any>) {
items = list
asyncListDiffer.submitList(list)
}
}
如题