don't show duplicate status message in contact details

This commit is contained in:
Daniel Gultsch 2016-05-13 11:57:02 +02:00
parent e41a9483bd
commit 6a28b5a9fa

View file

@ -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);
}
}
}