diff --git a/mozilla/mailnews/local/src/nsLocalMailFolder.cpp b/mozilla/mailnews/local/src/nsLocalMailFolder.cpp index 92eeff04475..1d74cb2b12c 100644 --- a/mozilla/mailnews/local/src/nsLocalMailFolder.cpp +++ b/mozilla/mailnews/local/src/nsLocalMailFolder.cpp @@ -2467,11 +2467,11 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndCopy(PRBool copySucceeded) mCopyState->m_parseMsgState->ParseAFolderLine(CRLF, MSG_LINEBREAK_LEN); } + nsCOMPtr newHdr; // CopyFileMessage() and CopyMessages() from servers other than mailbox if (mCopyState->m_parseMsgState) { nsCOMPtr msgDb; - nsCOMPtr newHdr; mCopyState->m_parseMsgState->FinishHeader(); GetDatabaseWOReparse(getter_AddRefs(msgDb)); if (msgDb) @@ -2564,6 +2564,8 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndCopy(PRBool copySucceeded) } } + // Store whether the message is CopyMessages() or CopyFileMessage() + PRBool isCopyFileMessage = ! mCopyState->m_message; if(!mCopyState->m_isMove) { if (multipleCopiesFinished) @@ -2588,6 +2590,13 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndCopy(PRBool copySucceeded) EnableNotifications(allMessageCountNotifications, PR_TRUE, PR_FALSE /*dbBatching*/); //dest folder doesn't need db batching } } + // if CopyFileMessage() then notify that an item has been added + if (isCopyFileMessage) + { + nsCOMPtr notifier = do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID); + if (notifier) + notifier->NotifyItemAdded(newHdr); + } } return rv; }