mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 03:32:15 -05:00
don't show duplicate status message in contact details
This commit is contained in:
parent
e41a9483bd
commit
6a28b5a9fa
@ -75,9 +75,9 @@ public class Presences {
|
|||||||
ArrayList<String> messages = new ArrayList<>();
|
ArrayList<String> messages = new ArrayList<>();
|
||||||
synchronized (this.presences) {
|
synchronized (this.presences) {
|
||||||
for(Presence presence : this.presences.values()) {
|
for(Presence presence : this.presences.values()) {
|
||||||
String message = presence.getMessage();
|
String message = presence.getMessage() == null ? null : presence.getMessage().trim();
|
||||||
if (message != null && !message.trim().isEmpty()) {
|
if (message != null && !message.isEmpty() && !messages.contains(message)) {
|
||||||
messages.add(message.trim());
|
messages.add(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user