Skip to content

Commit

Permalink
fix: comparator for torrents list
Browse files Browse the repository at this point in the history
  • Loading branch information
Yash-Garg committed Sep 8, 2023
1 parent 4a82eee commit 715ee84
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ class TorrentListAdapter @Inject constructor() :

private class TorrentComparator : DiffUtil.ItemCallback<Torrent>() {
override fun areItemsTheSame(oldItem: Torrent, newItem: Torrent): Boolean {
return oldItem.hash == newItem.hash
return oldItem == newItem
}

override fun areContentsTheSame(oldItem: Torrent, newItem: Torrent): Boolean {
return oldItem == newItem
return oldItem.hash == newItem.hash
}
}

Expand Down

0 comments on commit 715ee84

Please sign in to comment.