comparison 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
comparison
equal deleted inserted replaced
3157:8b4354b5c05f 3158:6032245c927e
884 % {"room_jid": room_jid_s, "profile": profile} 884 % {"room_jid": room_jid_s, "profile": profile}
885 ) 885 )
886 room_jid = jid.JID(room_jid_s) 886 room_jid = jid.JID(room_jid_s)
887 chat_widget = self.widgets.getWidget(quick_chat.QuickChat, room_jid, profile) 887 chat_widget = self.widgets.getWidget(quick_chat.QuickChat, room_jid, profile)
888 if chat_widget: 888 if chat_widget:
889 self.widgets.deleteWidget(chat_widget) 889 self.widgets.deleteWidget(
890 chat_widget, all_instances=True, explicit_close=True)
890 self.contact_lists[profile].removeContact(room_jid) 891 self.contact_lists[profile].removeContact(room_jid)
891 892
892 def mucRoomUserChangedNickHandler(self, room_jid_s, old_nick, new_nick, profile): 893 def mucRoomUserChangedNickHandler(self, room_jid_s, old_nick, new_nick, profile):
893 """Called when an user joined a MUC room""" 894 """Called when an user joined a MUC room"""
894 room_jid = jid.JID(room_jid_s) 895 room_jid = jid.JID(room_jid_s)