Skip to content
Snippets Groups Projects
Commit b8544adb authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Improve MediaLibraryItem equals

parent 15376de4
No related branches found
No related tags found
No related merge requests found
......@@ -107,8 +107,12 @@ public abstract class MediaLibraryItem implements Parcelable {
return false;
if (getItemType() != other.getItemType())
return false;
if (mId != 0)
return mId == other.getId();
if (getItemType() == TYPE_DUMMY)
return TextUtils.equals(getTitle(), other.getTitle());
return mId == other.getId();
if (getItemType() == TYPE_MEDIA)
return TextUtils.equals(((MediaWrapper)this).getLocation(), ((MediaWrapper)other).getLocation());
return false;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment