User:Rkentjames:NewCounts: Difference between revisions

m
Line 23: Line 23:
=== Message flags ===
=== Message flags ===


The existing MSG_FLAG_NEW will be defined as "This newly received message has not been seen in the message pane of a folder since it was received" The flag is cleared when the user exits a folder which displays the flag, or when the message is marked read.
The existing MSG_FLAG_NEW will be defined as "This newly received message has not been seen in the message pane of a folder since it was received" The flag is cleared when the user exits a folder which displays the flag, or when the message is marked read. This flag is relatively independent of the BIFF notification cycle, and should transition to being preserved between sessions in the message database.


A new flag MSG_FLAG_NOTIFY will be defined as "This newly received message needs notification"
A new flag MSG_FLAG_NOTIFY will be defined as "This newly received message needs notification by BIFF"


A new flag MSG_FLAG_BIFF will be defined as "This newly received message has not completed a BIFF notification cycle" (Perhaps a more logical definition would be "This message was notified in the current BIFF cycle". But we need to maintain the new message key list in sorted order, hence we want to avoid a flag definition where the flag is set at a later time.)
A new flag MSG_FLAG_BIFF will be defined as "This newly received message has not completed a BIFF notification cycle" (Perhaps a more logical definition would be "This message was notified in the current BIFF cycle". But we need to maintain the new message key list in sorted order, hence we want to avoid a flag definition where the flag is set at a later time.)
A "BIFF notification cycle" is defined as "a periodic check of whether to notify users of new mail, including the notification". This may be the same as the check for new mail, or may be independent of those checks.


Transitions:
Transitions:


1) When email is newly received, all three flags are set
1) When email is newly received, NEW, BIFF, and NOTIFY flags are set.
 
2) At the beginning of a BIFF notification cycle, for all folders, if MSG_FLAG_NOTIFY is cleared, then MSG_FLAG_BIFF is cleared. If MSG_FLAG_NOTIFY is set, then MSG_FLAG_NOTIFY is cleared, BIFF notification is enabled, and the message is added to the BIFF summary list.
 
3) Message filters may disable notification for a particular message by clearing the NOTIFY flag.
 
4) When an email is read, NEW, BIFF, and NOTIFY are cleared.
 
5) When the open folder is changed, NEW, BIFF and NOTIFY are cleared for all messages in the previous folder. (Perhaps disable clears when new folder is selected with ALT button pressed?)


2) At the beginning of a BIFF notification cycle, if MSG_FLAG_NOTIFY is cleared, then MSG_FLAG_BIFF is cleared. Otherwise, MSG_FLAG_NOTIFY is cleared, BIFF notification is enabled, and the message is added to the BIFF summary list.
6) When an email is classified as junk, NOTIFY and BIFF are cleared - but NEW remains set. (That way, you can still see which JUNK messages have been newly added to a folder since the last time that you opened it).


We maintain a count for each folder of Needs Notification (MSG_FLAG_NOTIFY set) and In Biff (MSG_FLAG_BIFF set and MSG_FLAG_NOTIFY cleared).
We maintain a count for each folder of New nessages (MSG_FLAG_NEW set), Needs Notification (MSG_FLAG_NOTIFY set) and In Biff (MSG_FLAG_BIFF set and MSG_FLAG_NOTIFY cleared).
90

edits