Do not hide big brother contacts when a child has pending events. Fixes #3921
This commit is contained in:
parent
c5f7922e29
commit
0d27f521d4
1 changed files with 18 additions and 2 deletions
|
@ -1331,6 +1331,22 @@ class RosterWindow:
|
||||||
if type_ == 'contact':
|
if type_ == 'contact':
|
||||||
if gajim.config.get('showoffline'):
|
if gajim.config.get('showoffline'):
|
||||||
return True
|
return True
|
||||||
|
bb_jid = None
|
||||||
|
bb_account = None
|
||||||
|
family = gajim.contacts.get_metacontacts_family(account, jid)
|
||||||
|
if family:
|
||||||
|
nearby_family, bb_jid, bb_account = \
|
||||||
|
self._get_nearby_family_and_big_brother(family, account)
|
||||||
|
if (bb_jid, bb_account) == (jid, account):
|
||||||
|
# Show the big brother if a child has pending events
|
||||||
|
for data in nearby_family:
|
||||||
|
jid = data['jid']
|
||||||
|
account = data['account']
|
||||||
|
contact = gajim.contacts.get_first_contact_from_jid(account, jid)
|
||||||
|
if self.contact_is_visible(contact, account):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
else:
|
||||||
contact = gajim.contacts.get_first_contact_from_jid(account, jid)
|
contact = gajim.contacts.get_first_contact_from_jid(account, jid)
|
||||||
return self.contact_is_visible(contact, account)
|
return self.contact_is_visible(contact, account)
|
||||||
if type_ == 'agent':
|
if type_ == 'agent':
|
||||||
|
|
Loading…
Add table
Reference in a new issue