diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-05-11 07:57:52 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-05-11 07:57:52 +0200 |
commit | 22b12091a103a164a1d54874ad376d02dfee1519 (patch) | |
tree | c4b6d64528112212b8185c7a893bc4e3e695cd7d /src/main/java/eu/siacs/conversations/entities/Conversation.java | |
parent | 239e86a98a4af8ab7ce7f6b96bed0bb4dc9e4bb5 (diff) |
rewrote parts of message adapter to avoid using NULL views
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Conversation.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index bfee50075..95a8c957d 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -16,6 +16,7 @@ import java.security.interfaces.DSAPublicKey; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; +import java.util.Iterator; import java.util.List; import eu.siacs.conversations.Config; @@ -218,6 +219,11 @@ public class Conversation extends AbstractEntity implements Blockable { messages.clear(); messages.addAll(this.messages); } + for(Iterator<Message> iterator = messages.iterator(); iterator.hasNext();) { + if (iterator.next().wasMergedIntoPrevious()) { + iterator.remove(); + } + } } @Override |