always search offline contacts as well. fixes #1653

This commit is contained in:
Daniel Gultsch 2016-02-27 15:41:34 +01:00
parent 2c224d0f18
commit 24a9ac2908

View file

@ -740,6 +740,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
Presence.Status s = p == null ? Presence.Status.OFFLINE : p.getStatus(); Presence.Status s = p == null ? Presence.Status.OFFLINE : p.getStatus();
if (contact.showInRoster() && contact.match(needle) if (contact.showInRoster() && contact.match(needle)
&& (!this.mHideOfflineContacts && (!this.mHideOfflineContacts
|| (needle != null && !needle.trim().isEmpty())
|| s.compareTo(Presence.Status.OFFLINE) < 0)) { || s.compareTo(Presence.Status.OFFLINE) < 0)) {
this.contacts.add(contact); this.contacts.add(contact);
} }