Skip to content
Snippets Groups Projects
Commit dab1e20d authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

don't keep in mem notifications when we handle them Fixes #6891

parent e11a2866
No related branches found
No related tags found
No related merge requests found
......@@ -192,11 +192,14 @@ class NotificationResponseManager:
self.interface.connect_to_signal('NotificationClosed', self.on_closed)
def on_action_invoked(self, id_, reason):
self.received.append((id_, time.time(), reason))
if id_ in self.pending:
notification = self.pending[id_]
notification.on_action_invoked(id_, reason)
del self.pending[id_]
return
# got an action on popup that isn't handled yet? Maybe user clicked too
# fast. Remember it.
self.received.append((id_, time.time(), reason))
if len(self.received) > 20:
curt = time.time()
for rec in self.received:
......@@ -410,9 +413,8 @@ class DesktopNotification:
self.notify_another_way(e)
def attach_by_id(self, id_):
self.id = id_
notification_response_manager.attach_to_interface()
notification_response_manager.add_pending(self.id, self)
notification_response_manager.add_pending(id_, self)
def notify_another_way(self, e):
gajim.log.debug('Error when trying to use notification daemon: %s' % \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment