diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-03-19 16:16:40 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-03-19 16:16:40 +0100 |
commit | 6be2a08f19f07e9db5da3e644c8d62102fdd27e7 (patch) | |
tree | 88a319a2b46dd82ef5b5619605eda0cfe033f13e /src/eu/siacs/conversations/ui/ConversationActivity.java | |
parent | 389d4db311f22ceb787976a6c6130bb0260610bb (diff) |
otr messages are now ignored if conversations isnt 100% sure the message is ours
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/ui/ConversationActivity.java | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index a08e0727..4acddf8a 100644 --- a/src/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -1,8 +1,6 @@ package eu.siacs.conversations.ui; import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; import java.util.List; import eu.siacs.conversations.R; @@ -62,9 +60,6 @@ public class ConversationActivity extends XmppActivity { @Override public void onConversationListChanged() { - conversationList.clear(); - conversationList.addAll(xmppConnectionService - .getConversations()); runOnUiThread(new Runnable() { @Override @@ -120,18 +115,6 @@ public class ConversationActivity extends XmppActivity { return paneShouldBeOpen; } - public void updateConversationList() { - if (conversationList.size() >= 1) { - Collections.sort(this.conversationList, new Comparator<Conversation>() { - @Override - public int compare(Conversation lhs, Conversation rhs) { - return (int) (rhs.getLatestMessage().getTimeSent() - lhs.getLatestMessage().getTimeSent()); - } - }); - } - this.listView.invalidateViews(); - } - @Override protected void onCreate(Bundle savedInstanceState) { @@ -229,7 +212,7 @@ public class ConversationActivity extends XmppActivity { if (!getSelectedConversation().isRead()) { getSelectedConversation().markRead(); UIHelper.updateNotification(getApplicationContext(), getConversationList(), null, false); - updateConversationList(); + listView.invalidateViews(); } } } @@ -434,10 +417,7 @@ public class ConversationActivity extends XmppActivity { this.registerListener(); if (conversationList.size()==0) { - conversationList.addAll(xmppConnectionService - .getConversations()); - - this.updateConversationList(); + updateConversationList(); } if ((getIntent().getAction()!=null)&&(getIntent().getAction().equals(Intent.ACTION_VIEW) && (!handledViewIntent))) { @@ -495,4 +475,11 @@ public class ConversationActivity extends XmppActivity { } } } + + public void updateConversationList() { + conversationList.clear(); + conversationList.addAll(xmppConnectionService + .getConversations()); + listView.invalidateViews(); + } } |