|
|
@ -24,13 +24,11 @@ class DiffCallBack(private val oldItems: List<SearchBook>, private val newItems: |
|
|
|
override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean { |
|
|
|
override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean { |
|
|
|
val oldItem = oldItems[oldItemPosition] |
|
|
|
val oldItem = oldItems[oldItemPosition] |
|
|
|
val newItem = newItems[newItemPosition] |
|
|
|
val newItem = newItems[newItemPosition] |
|
|
|
if (oldItem.originName != newItem.originName) { |
|
|
|
return when { |
|
|
|
return false |
|
|
|
oldItem.originName != newItem.originName -> false |
|
|
|
} |
|
|
|
oldItem.latestChapterTitle != newItem.latestChapterTitle -> false |
|
|
|
if (oldItem.latestChapterTitle != newItem.latestChapterTitle) { |
|
|
|
else -> true |
|
|
|
return false |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return true |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun getChangePayload(oldItemPosition: Int, newItemPosition: Int): Any? { |
|
|
|
override fun getChangePayload(oldItemPosition: Int, newItemPosition: Int): Any? { |
|
|
|