aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
diff options
context:
space:
mode:
authorlookshe <github@lookshe.org>2016-02-16 11:41:54 +0100
committerlookshe <github@lookshe.org>2016-02-16 11:41:54 +0100
commit1e40764b20a08170f8e4bfe1f1ae1559111f2961 (patch)
tree1791a3870361f37c3c34c299d075f56ed4a6e2c2 /src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
parenta049aff638f27b68f08c753d42ef0fc2847b96cb (diff)
parentd58d822215708cc0d9c841872abab448bf290e4c (diff)
Merge tag '1.9.4' into trz/merge_1.9.4
Conflicts: build.gradle src/main/java/eu/siacs/conversations/generator/PresenceGenerator.java src/main/java/eu/siacs/conversations/parser/PresenceParser.java src/main/java/eu/siacs/conversations/services/MessageArchiveService.java src/main/java/eu/siacs/conversations/services/XmppConnectionService.java src/main/java/eu/siacs/conversations/ui/ConversationFragment.java src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java src/main/res/values/arrays.xml
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
index ba685dcf..cd1658e0 100644
--- a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
@@ -64,6 +64,7 @@ import eu.siacs.conversations.entities.Bookmark;
import eu.siacs.conversations.entities.Contact;
import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.ListItem;
+import eu.siacs.conversations.entities.Presence;
import eu.siacs.conversations.entities.Presences;
import eu.siacs.conversations.services.XmppConnectionService.OnRosterUpdate;
import eu.siacs.conversations.ui.adapter.KnownHostsAdapter;
@@ -727,9 +728,11 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
for (Account account : xmppConnectionService.getAccounts()) {
if (account.getStatus() != Account.State.DISABLED) {
for (Contact contact : account.getRoster().getContacts()) {
+ Presence p = contact.getPresences().getMostAvailablePresence();
+ Presence.Status s = p == null ? Presence.Status.OFFLINE : p.getStatus();
if (contact.showInRoster() && contact.match(needle)
&& (!this.mHideOfflineContacts
- || contact.getPresences().getMostAvailableStatus() < Presences.OFFLINE)) {
+ || s.compareTo(Presence.Status.OFFLINE) < 0)) {
this.contacts.add(contact);
}
}