[csmaild-cvs] csmaild/src/Common Mailbox.cs,1.7,1.8
Brought to you by:
tamc
From: <ta...@us...> - 2003-07-30 22:32:37
|
Update of /cvsroot/csmaild/csmaild/src/Common In directory sc8-pr-cvs1:/tmp/cvs-serv14606/src/Common Modified Files: Mailbox.cs Log Message: Added Unseen count property Fixed ExtractName to exclude '/' as a last character Index: Mailbox.cs =================================================================== RCS file: /cvsroot/csmaild/csmaild/src/Common/Mailbox.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Mailbox.cs 29 Jul 2003 00:46:28 -0000 1.7 --- Mailbox.cs 30 Jul 2003 22:32:34 -0000 1.8 *************** *** 143,146 **** --- 143,159 ---- } + public int MessageUnseenCount + { + get + { + // TODO: make this more efficient then having to load all the messages + int rv = 0; + foreach(Message msg in Messages) + if(!msg.Seen) + ++rv; + return rv; + } + } + public uint FirstUnseenMessageSeqNum { *************** *** 231,234 **** --- 244,249 ---- if(idx == -1) return fullName; + else if(idx == fullName.Length-1) + return ExtractName(fullName.Substring(0, fullName.Length-1)); else return fullName.Substring(idx+1); |