User:Rkentjames:Bug116181

From MozillaWiki
Jump to navigation Jump to search

Here I will collect my understanding of how the new mail counts and flags work, and how they relate to BIFF.

Get/Set NumNewMessages

These routines in nsMsgDBFolder operate on the mNumNewBiffMessages variable. This is not the same as the number of messages in a folder that has the flag MsgFlagNew set. Confused? So am I!

When a message is received from a server, then SetNumNewMessages is called to add the new messages. But the same thing is done in Virtual folder listeners, where the intention is clearly to track the number of messages with the new flag set.

Currently, PerformBiffNotification relies on GetNumNewMessages > 0 to decide to do Biff Notification. That makes sense, we don't want to do notification if counts have been set to zero by, say, junk mail processing. So we need to reset the counts at notification.

BiffState

Bugs this may affect