worked around concurrent modification exception
This commit is contained in:
parent
4a80914603
commit
46b2760069
|
@ -580,7 +580,13 @@ public class ConversationFragment extends Fragment {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Message message : this.conversation.getMessages()) {
|
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
|
if (message.getEncryption() == Message.ENCRYPTION_PGP
|
||||||
&& (message.getStatus() == Message.STATUS_RECEIVED || message
|
&& (message.getStatus() == Message.STATUS_RECEIVED || message
|
||||||
.getStatus() >= Message.STATUS_SEND)
|
.getStatus() >= Message.STATUS_SEND)
|
||||||
|
@ -591,12 +597,6 @@ public class ConversationFragment extends Fragment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
decryptNext();
|
decryptNext();
|
||||||
this.messageList.clear();
|
|
||||||
if (this.conversation.getMessages().size() == 0) {
|
|
||||||
messagesLoaded = false;
|
|
||||||
} else {
|
|
||||||
this.messageList.addAll(this.conversation.getMessages());
|
|
||||||
messagesLoaded = true;
|
|
||||||
updateStatusMessages();
|
updateStatusMessages();
|
||||||
}
|
}
|
||||||
this.messageListAdapter.notifyDataSetChanged();
|
this.messageListAdapter.notifyDataSetChanged();
|
||||||
|
|
Loading…
Reference in New Issue