don't look for a contact when we double click on an account row
This commit is contained in:
parent
d23612c904
commit
56598c447b
|
@ -3456,16 +3456,17 @@ class RosterWindow:
|
|||
model = self.modelfilter
|
||||
account = model[path][C_ACCOUNT].decode('utf-8')
|
||||
type_ = model[path][C_TYPE]
|
||||
jid = model[path][C_JID].decode('utf-8')
|
||||
resource = None
|
||||
contact = gajim.contacts.get_first_contact_from_jid(account, jid)
|
||||
titer = model.get_iter(path)
|
||||
if type_ in ('group', 'account'):
|
||||
if self.tree.row_expanded(path):
|
||||
self.tree.collapse_row(path)
|
||||
else:
|
||||
self.tree.expand_row(path, False)
|
||||
elif contact.is_groupchat():
|
||||
return
|
||||
jid = model[path][C_JID].decode('utf-8')
|
||||
resource = None
|
||||
contact = gajim.contacts.get_first_contact_from_jid(account, jid)
|
||||
titer = model.get_iter(path)
|
||||
if contact.is_groupchat():
|
||||
first_ev = gajim.events.get_first_event(account, jid)
|
||||
if first_ev and self.open_event(account, jid, first_ev):
|
||||
# We are invited to a GC
|
||||
|
@ -3473,7 +3474,9 @@ class RosterWindow:
|
|||
self.remove_groupchat(jid, account)
|
||||
else:
|
||||
self.on_groupchat_maximized(None, jid, account)
|
||||
else:
|
||||
return
|
||||
|
||||
# else
|
||||
first_ev = gajim.events.get_first_event(account, jid)
|
||||
if not first_ev:
|
||||
# look in other resources
|
||||
|
@ -3504,8 +3507,8 @@ class RosterWindow:
|
|||
# else
|
||||
contact = gajim.contacts.get_contact(account, jid, resource)
|
||||
if not contact or isinstance(contact, list):
|
||||
contact = \
|
||||
gajim.contacts.get_contact_with_highest_priority(account, jid)
|
||||
contact = gajim.contacts.get_contact_with_highest_priority(account,
|
||||
jid)
|
||||
if jid == gajim.get_jid_from_account(account):
|
||||
resource = contact.resource
|
||||
|
||||
|
|
Loading…
Reference in New Issue