The variable seenMessages is used to keep track of previously seen unread messages so that the user is not continuously notified about them. If this variable is allowed to grow indefinitely, some newly received message may look like an older one and a new mail notification will not be generated. See issue #65 for an example where this can happen.
The changes in this PR delete stale entries from seenMessages as the unread emails are read, keeping the contents of seenMessages up to date.
This fixes issue #65.
The variable
seenMessages
is used to keep track of previously seen unread messages so that the user is not continuously notified about them. If this variable is allowed to grow indefinitely, some newly received message may look like an older one and a new mail notification will not be generated. See issue #65 for an example where this can happen.The changes in this PR delete stale entries from
seenMessages
as the unread emails are read, keeping the contents ofseenMessages
up to date.