Bug 467527 - "Restart needed for localized folder name (Drafts/Junk/Sent/Templates/Archives name in folderpane tree)" - fix fcc to reply folder case [r+sr=Standard8]
authorDavid :Bienvenu <bienvenu@nventure.com>
Fri, 07 Aug 2009 10:27:35 +0100
changeset 3248 516661265fc83bdcc5279c3aaf89654ce350d666
parent 3247 ee6e556064d0a485d771261b5ee51450f7948768
child 3249 ef7e80d805672c67a9b5c6873dbd4ef9ca1dad05
push idunknown
push userunknown
push dateunknown
bugs467527
Bug 467527 - "Restart needed for localized folder name (Drafts/Junk/Sent/Templates/Archives name in folderpane tree)" - fix fcc to reply folder case [r+sr=Standard8]
mailnews/compose/src/nsMsgCopy.cpp
--- a/mailnews/compose/src/nsMsgCopy.cpp
+++ b/mailnews/compose/src/nsMsgCopy.cpp
@@ -374,17 +374,23 @@ nsMsgCopy::GetTemplatesFolder(nsIMsgIden
   return ret;
 }
 
 nsresult
 nsMsgCopy::GetSentFolder(nsIMsgIdentity *userIdentity, nsIMsgFolder **folder, PRBool *waitForUrl)
 {
   nsresult ret = LocateMessageFolder(userIdentity, nsIMsgSend::nsMsgDeliverNow, mSavePref, folder);
   if (*folder)
-    (*folder)->SetFlag(nsMsgFolderFlags::SentMail);
+  {
+    // If mSavePref is the same as the identity's fcc folder, set the sent flag.
+    nsCString identityFccUri;
+    userIdentity->GetFccFolder(identityFccUri);
+    if (identityFccUri.Equals(mSavePref))
+      (*folder)->SetFlag(nsMsgFolderFlags::SentMail);
+  }
   CreateIfMissing(folder, waitForUrl);
   return ret;
 }
 
 nsresult
 nsMsgCopy::CreateIfMissing(nsIMsgFolder **folder, PRBool *waitForUrl)
 {
   nsresult ret = NS_OK;