now_listen. correct disconnecting from chat control
This commit is contained in:
@@ -95,6 +95,8 @@ class Base(object):
|
|||||||
self.chat_control.handlers[self.id_] = self.chat_control.msg_textview
|
self.chat_control.handlers[self.id_] = self.chat_control.msg_textview
|
||||||
|
|
||||||
def disconnect_from_chat_control(self):
|
def disconnect_from_chat_control(self):
|
||||||
|
if self.id_ not in self.chat_control.handlers:
|
||||||
|
return
|
||||||
if self.chat_control.handlers[self.id_].handler_is_connected(self.id_):
|
if self.chat_control.handlers[self.id_].handler_is_connected(self.id_):
|
||||||
self.chat_control.handlers[self.id_].disconnect(self.id_)
|
self.chat_control.handlers[self.id_].disconnect(self.id_)
|
||||||
del self.chat_control.handlers[self.id_]
|
del self.chat_control.handlers[self.id_]
|
||||||
|
|||||||
Reference in New Issue
Block a user