From 7fa35f18e4881a33cbd69ff483e5350dd8f12bad Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Mon, 10 Dec 2018 02:32:57 -0600 Subject: [PATCH] Clear attachments list when switching to a new message in chats --- src/controller/buffers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/buffers.py b/src/controller/buffers.py index 712d88e..808f2e8 100644 --- a/src/controller/buffers.py +++ b/src/controller/buffers.py @@ -613,7 +613,6 @@ class empty(object): class chatBuffer(baseBuffer): - 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.""" 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: self.tab.attachments.list.Enable(True) self.attachments = list() + self.tab.attachments.clear() self.parse_attachments(msg) else: self.tab.attachments.list.Enable(False)