From cc574f2e2139bc4b03e775b615933d5307f46280 Mon Sep 17 00:00:00 2001 From: Dan Christensen Date: Wed, 3 Jun 2020 19:49:10 -0400 Subject: [PATCH] libnotifyplugin: Rename mails variable to new_mails in _notify_single --- Mailnag/plugins/libnotifyplugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Mailnag/plugins/libnotifyplugin.py b/Mailnag/plugins/libnotifyplugin.py index c23e671..14e9445 100644 --- a/Mailnag/plugins/libnotifyplugin.py +++ b/Mailnag/plugins/libnotifyplugin.py @@ -273,7 +273,7 @@ class LibNotifyPlugin(Plugin): self._notifications['0'].show() - def _notify_single(self, mails, all_mails): + def _notify_single(self, new_mails, all_mails): # Remove notifications for messages not in all_mails: for k, n in list(self._notifications.items()): if hasattr(n, 'mail') and not (n.mail in all_mails): @@ -283,9 +283,9 @@ class LibNotifyPlugin(Plugin): # In single notification mode new mails are # added to the *bottom* of the notification list. - mails.sort(key = lambda m: m.datetime, reverse = False) + new_mails.sort(key = lambda m: m.datetime, reverse = False) - for mail in mails: + for mail in new_mails: n = self._get_notification(self._get_sender(mail), mail.subject, "mail-unread") # Remember the associated message, so we know when to remove the notification: n.mail = mail