Clear attachments list when switching to a new message in chats
This commit is contained in:
parent
217765254d
commit
7fa35f18e4
@ -613,7 +613,6 @@ class empty(object):
|
|||||||
|
|
||||||
class chatBuffer(baseBuffer):
|
class chatBuffer(baseBuffer):
|
||||||
|
|
||||||
|
|
||||||
def insert(self, item, reversed=False):
|
def insert(self, item, reversed=False):
|
||||||
""" Add a new item to the list. Uses session.composefunc for parsing the dictionary and create a valid result for putting it in the list."""
|
""" Add a new item to the list. Uses session.composefunc for parsing the dictionary and create a valid result for putting it in the list."""
|
||||||
item_ = getattr(renderers, self.compose_function)(item, self.session)
|
item_ = getattr(renderers, self.compose_function)(item, self.session)
|
||||||
@ -659,6 +658,7 @@ class chatBuffer(baseBuffer):
|
|||||||
if msg.has_key("attachments") and len(msg["attachments"]) > 0:
|
if msg.has_key("attachments") and len(msg["attachments"]) > 0:
|
||||||
self.tab.attachments.list.Enable(True)
|
self.tab.attachments.list.Enable(True)
|
||||||
self.attachments = list()
|
self.attachments = list()
|
||||||
|
self.tab.attachments.clear()
|
||||||
self.parse_attachments(msg)
|
self.parse_attachments(msg)
|
||||||
else:
|
else:
|
||||||
self.tab.attachments.list.Enable(False)
|
self.tab.attachments.list.Enable(False)
|
||||||
|
Loading…
Reference in New Issue
Block a user