User:Rkentjames:Bug116181: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 7: Line 7:
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.
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.


I think that the NumNewMessages should exactly track the messages in the folder that have the new flag set. This is a per folder setting.
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 ===
=== BiffState ===


== Bugs this may affect ==
== Bugs this may affect ==

Revision as of 07:37, 17 June 2008

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