Daniel Brötzmann pushed to branch mainwindow at gajim / gajim
Commits:
39d136ed by wurstsalat at 2021-02-20T22:38:24+01:00
ChatListStack: Fix moving group chats
- - - - -
2 changed files:
- gajim/gtk/chat_list_stack.py
- gajim/gtk/main.py
Changes:
=====================================
gajim/gtk/chat_list_stack.py
=====================================
@@ -53,6 +53,9 @@ def _on_window_active(self, window, _param):
if chat is not None:
chat.reset_unread()
+ def get_chatlist(self, workspace_id):
+ return self._chat_lists[workspace_id]
+
def get_selected_chat(self):
workspace_id = self.get_visible_child_name()
if workspace_id == 'empty':
=====================================
gajim/gtk/main.py
=====================================
@@ -442,8 +442,9 @@ def _move_chat_to_workspace(self, _action, param):
def move_chat_to_workspace(self, new_workspace_id, account, jid):
current_chatlist = self._chat_list_stack.get_visible_child()
type_ = current_chatlist.get_chat_type(account, jid)
- self.remove_chat(current_chatlist.workspace_id, account, jid)
- self.add_chat_for_workspace(new_workspace_id, account, jid, type_)
+ current_chatlist.remove_chat(account, jid)
+ new_chatlist = self._chat_list_stack.get_chatlist(new_workspace_id)
+ new_chatlist.add_chat(account, jid, type_)
def _remove_chat(self, _action, param):
workspace_id, account, jid = param.unpack()
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/39d136edc69e32c13a8ebcda58157838d9600f40
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/39d136edc69e32c13a8ebcda58157838d9600f40
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits