Added local contacts display

This commit is contained in:
M66B
2019-03-14 18:47:10 +00:00
parent 6cb03a0c23
commit b2ea687159
8 changed files with 431 additions and 12 deletions

View File

@@ -23,8 +23,10 @@ import org.json.JSONException;
import org.json.JSONObject;
import java.io.Serializable;
import java.util.Objects;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.room.Entity;
import androidx.room.Index;
import androidx.room.PrimaryKey;
@@ -94,6 +96,21 @@ public class EntityContact implements Serializable {
return contact;
}
@Override
public boolean equals(@Nullable Object obj) {
if (obj instanceof EntityContact) {
EntityContact other = (EntityContact) obj;
return (this.type == other.type &&
this.email.equals(other.email) &&
Objects.equals(this.name, other.name) &&
Objects.equals(this.avatar, other.avatar) &&
this.times_contacted == other.times_contacted &&
Objects.equals(this.last_contacted, other.last_contacted));
} else
return false;
}
@NonNull
@Override
public String toString() {