aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-03-19 16:16:40 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-03-19 16:16:40 +0100
commit6be2a08f19f07e9db5da3e644c8d62102fdd27e7 (patch)
tree88a319a2b46dd82ef5b5619605eda0cfe033f13e /src/eu/siacs/conversations/ui
parent389d4db311f22ceb787976a6c6130bb0260610bb (diff)
otr messages are now ignored if conversations isnt 100% sure the message is ours
Diffstat (limited to 'src/eu/siacs/conversations/ui')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationActivity.java31
-rw-r--r--src/eu/siacs/conversations/ui/ManageAccountActivity.java2
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) {