roster now shows the correct state image
This commit is contained in:
parent
d220cde8cd
commit
9f0b1e50cd
|
@ -230,19 +230,12 @@ class RosterWindow:
|
||||||
iters = self.get_contact_iter(jid, account)
|
iters = self.get_contact_iter(jid, account)
|
||||||
if len(iters) == 0:
|
if len(iters) == 0:
|
||||||
return
|
return
|
||||||
contact_instances = gajim.get_contact_instances_from_jid(account,
|
contact_instances = gajim.get_contact_instances_from_jid(account, jid)
|
||||||
jid)
|
contact = gajim.get_highest_prio_contact_from_contacts(contact_instances)
|
||||||
contact = contact_instances[0]
|
|
||||||
name = contact.name
|
name = contact.name
|
||||||
if len(contact_instances) > 1:
|
if len(contact_instances) > 1:
|
||||||
name += ' (' + str(len(contact_instances)) + ')'
|
name += ' (' + str(len(contact_instances)) + ')'
|
||||||
|
|
||||||
prio = 0 # FIXME: add a comment explain what you do here
|
|
||||||
for c in contact_instances:
|
|
||||||
if c.priority > prio:
|
|
||||||
prio = c.priority
|
|
||||||
contact = c
|
|
||||||
|
|
||||||
state_images = self.get_appropriate_state_images(jid)
|
state_images = self.get_appropriate_state_images(jid)
|
||||||
if gajim.awaiting_messages[account].has_key(jid):
|
if gajim.awaiting_messages[account].has_key(jid):
|
||||||
img = state_images['message']
|
img = state_images['message']
|
||||||
|
|
Loading…
Reference in New Issue