From fd5760d27aa45d3e8063a46bb1f0874e7ab4e10c Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Sat, 12 Jul 2014 12:41:37 +0200 Subject: made conversation list thread safe --- src/eu/siacs/conversations/ui/ConversationActivity.java | 3 +-- src/eu/siacs/conversations/ui/ShareWithActivity.java | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/eu/siacs/conversations/ui') diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index aea35d3c..209ff3b8 100644 --- a/src/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -805,8 +805,7 @@ public class ConversationActivity extends XmppActivity { } public void updateConversationList() { - conversationList.clear(); - conversationList.addAll(xmppConnectionService.getConversations()); + xmppConnectionService.populateWithOrderedConversations(conversationList); listView.invalidateViews(); } diff --git a/src/eu/siacs/conversations/ui/ShareWithActivity.java b/src/eu/siacs/conversations/ui/ShareWithActivity.java index 601caa29..461aaec4 100644 --- a/src/eu/siacs/conversations/ui/ShareWithActivity.java +++ b/src/eu/siacs/conversations/ui/ShareWithActivity.java @@ -89,7 +89,8 @@ public class ShareWithActivity extends XmppActivity { Set displayedContacts = new HashSet(); conversations.removeAllViews(); - List convList = xmppConnectionService.getConversations(); + List convList = new ArrayList(); + xmppConnectionService.populateWithOrderedConversations(convList); Collections.sort(convList, new Comparator() { @Override public int compare(Conversation lhs, Conversation rhs) { -- cgit v1.2.3