aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-12-03 00:54:07 +0100
committeriNPUTmice <daniel@gultsch.de>2014-12-03 00:54:07 +0100
commit46b2760069874cda80a8f23f20adaa886c422f59 (patch)
tree16f8f41d070daa5c5bd3b8f6fc0cf65a6a272dab /src/main/java/eu
parent4a809146030e578de1871087108fcd3a276e5369 (diff)
worked around concurrent modification exception
Diffstat (limited to 'src/main/java/eu')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationFragment.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
index 1d26ff8a..0edc6b6f 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
@@ -580,23 +580,23 @@ public class ConversationFragment extends Fragment {
break;
}
}
- for (Message message : this.conversation.getMessages()) {
- if (message.getEncryption() == Message.ENCRYPTION_PGP
- && (message.getStatus() == Message.STATUS_RECEIVED || message
- .getStatus() >= Message.STATUS_SEND)
- && message.getDownloadable() == null) {
- if (!mEncryptedMessages.contains(message)) {
- mEncryptedMessages.add(message);
- }
- }
- }
- decryptNext();
this.messageList.clear();
if (this.conversation.getMessages().size() == 0) {
messagesLoaded = false;
} else {
this.messageList.addAll(this.conversation.getMessages());
messagesLoaded = true;
+ for (Message message : this.messageList) {
+ if (message.getEncryption() == Message.ENCRYPTION_PGP
+ && (message.getStatus() == Message.STATUS_RECEIVED || message
+ .getStatus() >= Message.STATUS_SEND)
+ && message.getDownloadable() == null) {
+ if (!mEncryptedMessages.contains(message)) {
+ mEncryptedMessages.add(message);
+ }
+ }
+ }
+ decryptNext();
updateStatusMessages();
}
this.messageListAdapter.notifyDataSetChanged();