fix re-joining a groupchat when control is already opened. Fixes #4425
This commit is contained in:
parent
ccc0cfd708
commit
8f9f2bf276
13
src/gajim.py
13
src/gajim.py
|
@ -2600,12 +2600,11 @@ class Interface:
|
|||
_('You cannot join a group chat while you are invisible'))
|
||||
return
|
||||
|
||||
minimized_control_exists = False
|
||||
if room_jid in gajim.interface.minimized_controls[account]:
|
||||
minimized_control_exists = True
|
||||
minimized_control = gajim.interface.minimized_controls[account].get(
|
||||
room_jid, None)
|
||||
|
||||
if not minimized_control_exists and \
|
||||
not self.msg_win_mgr.has_window(room_jid, account):
|
||||
if minimized_control is None and not self.msg_win_mgr.has_window(room_jid,
|
||||
account):
|
||||
# Join new groupchat
|
||||
if minimize:
|
||||
contact = gajim.contacts.create_contact(jid=room_jid, name=nick)
|
||||
|
@ -2614,12 +2613,14 @@ class Interface:
|
|||
self.roster.add_groupchat(room_jid, account)
|
||||
else:
|
||||
self.new_room(room_jid, nick, account, is_continued=is_continued)
|
||||
elif not minimized_control_exists:
|
||||
elif minimized_control is None:
|
||||
# We are already in that groupchat
|
||||
gc_control = self.msg_win_mgr.get_gc_control(room_jid, account)
|
||||
gc_control.nick = nick
|
||||
gc_control.parent_win.set_active_tab(gc_control)
|
||||
else:
|
||||
# We are already in this groupchat and it is minimized
|
||||
minimized_control.nick = nick
|
||||
self.roster.add_groupchat(room_jid, account)
|
||||
|
||||
# Connect
|
||||
|
|
Loading…
Reference in New Issue