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'))
|
_('You cannot join a group chat while you are invisible'))
|
||||||
return
|
return
|
||||||
|
|
||||||
minimized_control_exists = False
|
minimized_control = gajim.interface.minimized_controls[account].get(
|
||||||
if room_jid in gajim.interface.minimized_controls[account]:
|
room_jid, None)
|
||||||
minimized_control_exists = True
|
|
||||||
|
|
||||||
if not minimized_control_exists and \
|
if minimized_control is None and not self.msg_win_mgr.has_window(room_jid,
|
||||||
not self.msg_win_mgr.has_window(room_jid, account):
|
account):
|
||||||
# Join new groupchat
|
# Join new groupchat
|
||||||
if minimize:
|
if minimize:
|
||||||
contact = gajim.contacts.create_contact(jid=room_jid, name=nick)
|
contact = gajim.contacts.create_contact(jid=room_jid, name=nick)
|
||||||
|
@ -2614,12 +2613,14 @@ class Interface:
|
||||||
self.roster.add_groupchat(room_jid, account)
|
self.roster.add_groupchat(room_jid, account)
|
||||||
else:
|
else:
|
||||||
self.new_room(room_jid, nick, account, is_continued=is_continued)
|
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
|
# We are already in that groupchat
|
||||||
gc_control = self.msg_win_mgr.get_gc_control(room_jid, account)
|
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)
|
gc_control.parent_win.set_active_tab(gc_control)
|
||||||
else:
|
else:
|
||||||
# We are already in this groupchat and it is minimized
|
# We are already in this groupchat and it is minimized
|
||||||
|
minimized_control.nick = nick
|
||||||
self.roster.add_groupchat(room_jid, account)
|
self.roster.add_groupchat(room_jid, account)
|
||||||
|
|
||||||
# Connect
|
# Connect
|
||||||
|
|
Loading…
Reference in New Issue