primitivus: fixes displaying online contacts when "Show offline contacts" is False

This commit is contained in:
souliane 2014-10-07 11:45:34 +02:00
commit cf106bde77

View file

@ -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.