Skip to content

Commit

Permalink
Change how an item is considered the same by our DiffCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrovgs committed Jul 19, 2017
1 parent a93bcff commit 18cc723
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class DiffCallback<T> extends DiffUtil.Callback {
boolean areTheSameInstance = oldItem == newItem;
boolean hasTheSameType = oldItem.getClass().equals(newItem);
boolean hasTheSameHash = oldItem.hashCode() == newItem.hashCode();
return areTheSameInstance && hasTheSameType && hasTheSameHash;
return areTheSameInstance || hasTheSameType && hasTheSameHash;
}

@Override public boolean areContentsTheSame(int oldItemPosition, int newItemPosition) {
Expand Down

0 comments on commit 18cc723

Please sign in to comment.