diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-05-13 11:57:02 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-05-13 21:56:29 +0200 |
commit | ddce327009e8838bfa093338fdf2ff0adba7f917 (patch) | |
tree | b3d533c24f1d15c62cf4f4473a59d36d460613c3 /src/main | |
parent | e23147211532a04dd2c5b1dc1c8a56f91bb91afb (diff) |
don't show duplicate status message in contact details
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Presences.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Presences.java b/src/main/java/eu/siacs/conversations/entities/Presences.java index 7630fd936..c80783317 100644 --- a/src/main/java/eu/siacs/conversations/entities/Presences.java +++ b/src/main/java/eu/siacs/conversations/entities/Presences.java @@ -75,9 +75,9 @@ public class Presences { ArrayList<String> messages = new ArrayList<>(); synchronized (this.presences) { for(Presence presence : this.presences.values()) { - String message = presence.getMessage(); - if (message != null && !message.trim().isEmpty()) { - messages.add(message.trim()); + String message = presence.getMessage() == null ? null : presence.getMessage().trim(); + if (message != null && !message.isEmpty() && !messages.contains(message)) { + messages.add(message); } } } |