From cf106bde77a3b66f26d53e431bfbc051f6cd86fd Mon Sep 17 00:00:00 2001 From: souliane Date: Tue, 7 Oct 2014 11:45:34 +0200 Subject: [PATCH] primitivus: fixes displaying online contacts when "Show offline contacts" is False --- frontends/src/primitivus/contact_list.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontends/src/primitivus/contact_list.py b/frontends/src/primitivus/contact_list.py index 4e65d894..875a79d9 100644 --- a/frontends/src/primitivus/contact_list.py +++ b/frontends/src/primitivus/contact_list.py @@ -232,7 +232,9 @@ class ContactList(urwid.WidgetWrap, QuickContactList): @param contact (str): JID userhost of the contact @return: True if that contact should be showed in the list""" - return self.getCache(JID(contact), 'show') != "unavailable" or self.show_disconnected or contact in self.alert_jid or contact == self.selected + show = self.getCache(JID(contact), 'show') + return (show is not None and show != "unavailable") or \ + self.show_disconnected or contact in self.alert_jid or contact == self.selected def nonEmptyGroup(self, contacts): """Tell if a contact group contains some contacts to show.