aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/entities/Contact.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-06-03 14:05:54 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-06-03 14:05:54 +0200
commit53e8964dc17e5c994eda369e78c3bb81133abd9b (patch)
treec2dba2530cfe2a7b7e5f7d0db87629b4fecdb637 /src/main/java/eu/siacs/conversations/entities/Contact.java
parent3eab3291dee7a3d20d2cf6ccb14da3e59562470f (diff)
reworked handeling of system contacts
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities/Contact.java')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Contact.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Contact.java b/src/main/java/eu/siacs/conversations/entities/Contact.java
index 9dbca59a..e546f214 100644
--- a/src/main/java/eu/siacs/conversations/entities/Contact.java
+++ b/src/main/java/eu/siacs/conversations/entities/Contact.java
@@ -237,8 +237,16 @@ public class Contact implements ListItem, Blockable {
return this.presences.getMostAvailableStatus();
}
- public void setPhotoUri(String uri) {
- this.photoUri = uri;
+ public boolean setPhotoUri(String uri) {
+ if (uri != null && !uri.equals(this.photoUri)) {
+ this.photoUri = uri;
+ return true;
+ } else if (this.photoUri != null && uri == null) {
+ this.photoUri = null;
+ return true;
+ } else {
+ return false;
+ }
}
public void setServerName(String serverName) {