Update of /cvsroot/mahogany/M/src/mail
In directory usw-pr-cvs1:/tmp/cvs-serv11008/src/mail

Modified Files:
        MailFolderCC.cpp 
Log Message:
avoid resetting the folder status to 0 sometimes

Index: MailFolderCC.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/MailFolderCC.cpp,v
retrieving revision 1.601
retrieving revision 1.602
diff -b -u -2 -r1.601 -r1.602
--- MailFolderCC.cpp    29 Mar 2002 20:42:22 -0000      1.601
+++ MailFolderCC.cpp    5 Apr 2002 21:10:16 -0000       1.602
@@ -3252,4 +3252,6 @@
    }
 
+   MailFolder *mfDst = FindFolder(folder);
+
    // update status of the target folder
    MfStatusCache *mfStatusCache = MfStatusCache::Get();
@@ -3257,9 +3259,13 @@
    if ( !mfStatusCache->GetStatus(nameDst, &status) )
    {
-      // assume it was empty... this is, of course, false, but it allows us to
-      // show the folder as having unseen/new/... messages in the tree without
-      // having to open it (slow!) and so this hack is well worth it
+      // if the folder is already opened, recount the number of messages in it
+      // now, otherwise assume it was empty... this is, of course, false, but
+      // it allows us to show the folder as having unseen/new/... messages in
+      // the tree without having to open it (slow!)
+      if ( !mfDst || !mfDst->CountAllMessages(&status) )
+      {
       status.total = 0;
    }
+   }
 
    UIdArray uidsNew;
@@ -3326,5 +3332,4 @@
 
    // if the folder is opened, we must also update the display
-   MailFolder *mfDst = FindFolder(folder);
    if ( mfDst )
    {


_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to