mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-23 12:53:08 +00:00
implement Event.equals()
This commit is contained in:
parent
cf87981d5f
commit
d89fd0c36b
2 changed files with 10 additions and 0 deletions
|
@ -274,6 +274,16 @@ public class Event extends SugarRecord implements Parcelable, Comparable<Event>
|
|||
return getSlug().compareTo(event.getSlug());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(obj instanceof Event){
|
||||
return getGuid().equals(((Event)obj).getGuid());
|
||||
} else {
|
||||
return super.equals(obj);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void update(Event e) {
|
||||
if(!this.updatedAt.equals(e.getUpdatedAt())){
|
||||
// TODO actually update
|
||||
|
|
Loading…
Reference in a new issue