Daniel Brötzmann pushed to branch master at gajim / gajim


Commits:
678579ad by wurstsalat at 2022-09-25T13:11:15+02:00
fix: When removing a chat, clear view only if it's currently loaded

Fixes #11164

- - - - -


1 changed file:

- gajim/gtk/chat_page.py


Changes:

=====================================
gajim/gtk/chat_page.py
=====================================
@@ -283,10 +283,16 @@ def remove_chat(self, account: str, jid: JID) -> None:
                 self._chat_list_stack.remove_chat(workspace_id, account, jid)
                 return
 
-    def _on_chat_removed(self, _chat_list: ChatList, account: str, jid: JID,
-                         type_: str) -> None:
+    def _on_chat_removed(self,
+                         _chat_list: ChatList,
+                         account: str,
+                         jid: JID,
+                         type_: str
+                         ) -> None:
+
+        if self._chat_control.is_loaded(account, jid):
+            self._chat_control.clear()
 
-        self._chat_control.clear()
         if type_ == 'groupchat':
             client = app.get_client(account)
             client.get_module('MUC').leave(jid)



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/678579adcce41add25e29899526711ee1f8bf724

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/678579adcce41add25e29899526711ee1f8bf724
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

Reply via email to