when a contact change his sub (from -> both) redraw it in correct group
This commit is contained in:
parent
9fa62c5529
commit
dafb182a0f
|
@ -988,6 +988,11 @@ class Interface:
|
||||||
gajim.contacts.add_contact(account, contact)
|
gajim.contacts.add_contact(account, contact)
|
||||||
self.roster.add_contact_to_roster(jid, account)
|
self.roster.add_contact_to_roster(jid, account)
|
||||||
else:
|
else:
|
||||||
|
re_add = False
|
||||||
|
# if sub changed: remove and re-add, maybe observer status changed
|
||||||
|
if contacts[0].sub != sub:
|
||||||
|
self.roster.remove_contact(contacts[0], account)
|
||||||
|
re_add = True
|
||||||
for contact in contacts:
|
for contact in contacts:
|
||||||
if not name:
|
if not name:
|
||||||
name = ''
|
name = ''
|
||||||
|
@ -996,6 +1001,8 @@ class Interface:
|
||||||
contact.ask = ask
|
contact.ask = ask
|
||||||
if groups:
|
if groups:
|
||||||
contact.groups = groups
|
contact.groups = groups
|
||||||
|
if re_add:
|
||||||
|
self.roster.add_contact_to_roster(jid, account)
|
||||||
self.roster.draw_contact(jid, account)
|
self.roster.draw_contact(jid, account)
|
||||||
if self.remote_ctrl:
|
if self.remote_ctrl:
|
||||||
self.remote_ctrl.raise_signal('RosterInfo', (account, array))
|
self.remote_ctrl.raise_signal('RosterInfo', (account, array))
|
||||||
|
|
Loading…
Reference in New Issue