diff sat_frontends/quick_frontend/quick_app.py @ 3158:6032245c927e

quick frontend (app): added "explicit_close" to deleteWidget, and use it on mucRoomLeftHandler: This flag can be used by frontends to decide if the widget must be really closed or not (otherwise, it may be interesting to keep a widget in memory to avoir recreating a new one each time that the chat must be displayed).
author Goffi <goffi@goffi.org>
date Thu, 06 Feb 2020 00:01:36 +0100
parents 559a625a236b
children 30e08d904208
line wrap: on
line diff
--- a/sat_frontends/quick_frontend/quick_app.py	Wed Feb 05 23:59:19 2020 +0100
+++ b/sat_frontends/quick_frontend/quick_app.py	Thu Feb 06 00:01:36 2020 +0100
@@ -886,7 +886,8 @@
         room_jid = jid.JID(room_jid_s)
         chat_widget = self.widgets.getWidget(quick_chat.QuickChat, room_jid, profile)
         if chat_widget:
-            self.widgets.deleteWidget(chat_widget)
+            self.widgets.deleteWidget(
+                chat_widget, all_instances=True, explicit_close=True)
         self.contact_lists[profile].removeContact(room_jid)
 
     def mucRoomUserChangedNickHandler(self, room_jid_s, old_nick, new_nick, profile):