Skip to content

Commit

Permalink
fix diffCallback equality control
Browse files Browse the repository at this point in the history
  • Loading branch information
bsobe committed Nov 1, 2021
1 parent 7bddb43 commit 4290819
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ class InfoListItemDiffCallback : DiffUtil.ItemCallback<Pair<CharSequence, CharSe
oldItem: Pair<CharSequence, CharSequence>,
newItem: Pair<CharSequence, CharSequence>
): Boolean {
return oldItem.first == newItem.first && oldItem.second.toString() == newItem.second.toString()
return oldItem == newItem
}

override fun areItemsTheSame(
oldItem: Pair<CharSequence, CharSequence>,
newItem: Pair<CharSequence, CharSequence>
): Boolean {
return oldItem.second == newItem.second
return oldItem == newItem
}
}

0 comments on commit 4290819

Please sign in to comment.