diff options
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/ui/ConversationActivity.java | 31 | ||||
-rw-r--r-- | src/eu/siacs/conversations/ui/ManageAccountActivity.java | 2 |
2 files changed, 11 insertions, 22 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index a08e07273..4acddf8a6 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(); + } } diff --git a/src/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/eu/siacs/conversations/ui/ManageAccountActivity.java index b9ed41025..db6225fac 100644 --- a/src/eu/siacs/conversations/ui/ManageAccountActivity.java +++ b/src/eu/siacs/conversations/ui/ManageAccountActivity.java @@ -316,6 +316,8 @@ public class ManageAccountActivity extends XmppActivity { TextView carbon = (TextView) view.findViewById(R.id.carbon); TextView stream = (TextView) view.findViewById(R.id.stream); TextView roster = (TextView) view.findViewById(R.id.roster); + TextView presences = (TextView) view.findViewById(R.id.number_presences); + presences.setText(selectedAccountForActionMode.countPresences()+""); pcks_received.setText(""+xmpp.getReceivedStanzas()); pcks_sent.setText(""+xmpp.getSentStanzas()); if (connectionAgeHours >= 2) { |