package com.abbidot.tracker.diff

import com.abbidot.tracker.base.BaseDiffCallBack
import com.abbidot.tracker.bean.MenuTxtBean

/**
 *Created  by .yzq on 2022/3/24/024.
 * @link
 * @description:选意见反馈图片的数据比较差异
 */
class FeedbackImageDiffCallBack(oldList: MutableList<MenuTxtBean>,
                                newList: MutableList<MenuTxtBean>) :
    BaseDiffCallBack<MenuTxtBean>(oldList, newList) {

    private var mOldList = oldList
    private val mNewList = newList

    override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
        return mOldList[oldItemPosition].imageUrl == mNewList[newItemPosition].imageUrl
    }

    override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
        return mOldList[oldItemPosition].imageUrl == mNewList[newItemPosition].imageUrl
    }
}