Update of /cvsroot/mahogany/M/src/mail
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6071/src/mail

Modified Files:
        MailFolderCC.cpp 
Log Message:
update the GUI when we get new messages, even if they're not unread/recent

Index: MailFolderCC.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/MailFolderCC.cpp,v
retrieving revision 1.713
retrieving revision 1.714
diff -b -u -2 -r1.713 -r1.714
--- MailFolderCC.cpp    8 Apr 2006 01:52:45 -0000       1.713
+++ MailFolderCC.cpp    17 Apr 2006 16:12:35 -0000      1.714
@@ -4709,7 +4709,10 @@
               GetName().c_str());
 
-   // should we notify the GUI about the new mail in the folder? initially we
-   // don't need to do it as we are not even sure we actually have any new mail
-   bool shouldNotify = false;
+   // should we notify the GUI about the new mail in the folder?
+   //
+   // normally it should always be done so that the list of messages could be
+   // refreshed, the only case when we don't want to notify the GUI is when all
+   // the new messages are immediately removed by filters and so nothing 
changes
+   bool shouldNotify = true;
 
    // see if we have any new messages
@@ -4759,12 +4762,9 @@
                // process the new mail, whatever it means (collecting,
                // filtering, just reporting, ...)
-               if ( ProcessNewMail(*uidsNew) && !uidsNew->IsEmpty() )
+               if ( ProcessNewMail(*uidsNew) && uidsNew->IsEmpty() )
                {
-                  // ProcessNewMail() removes the messages removed by filters
-                  // or whatever else it does from uidsNew - if something is
-                  // left there after it finished, we have some new mail to
-                  // notify the GUI about (this has nothing to do with
-                  // notifying the user about new mail!)
-                  shouldNotify = true;
+                  // ProcessNewMail() removes all the messages so no need to
+                  // notify the GUI
+                  shouldNotify = false;
                }
                //else: nothing changed for this folder
@@ -4780,18 +4780,6 @@
       //else: this can possibly happen if they were deleted by another client
    }
-   else // no recent messages
-   {
-      // although normally any new message appearing in the folder must be
-      // recent, there are a few exceptions to this rule:
-      //
-      // 1. if another session has this folder opened, only it might see the
-      //    message as recent whereas we won't
-      //
-      // 2. the IMAP server I use is horribly broken for the moment and the
-      //    new messages don't have the recent flag _at_all_ which is, of
-      //    course, clearly a server bug but Mahogany should still be ready to
-      //    handle such madness
-      shouldNotify = true;
-   }
+   //else: no recent messages, this can happen if another session has this
+   //      folder opened, then this one might see the messages as already read
 
    // we delayed sending the update notification in OnMailExists() because we



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to