mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-10 22:09:32 +00:00
Bug #250698 --> make nsIMsgCopyService.CopyFileMessage useful for arbitrary folders
Patch by Myk r=bienvenu sr=sspitzer
This commit is contained in:
parent
cac87b4492
commit
d14281084f
@ -4393,8 +4393,10 @@ NS_IMETHODIMP nsImapMailFolder::GetCurMoveCopyMessageFlags(nsIImapUrl *runningUr
|
||||
if (label != 0)
|
||||
*aResult |= label << 25;
|
||||
}
|
||||
else if (mFlags & MSG_FOLDER_FLAG_DRAFTS) // if the message is being added to the drafts folder, don't add the seen flag (Bug #198087)
|
||||
*aResult = 0;
|
||||
// if the message is being added to the Sent or Templates folders,
|
||||
// add the seen flag so the message gets marked read
|
||||
else if (mFlags & (MSG_FOLDER_FLAG_SENTMAIL | MSG_FOLDER_FLAG_TEMPLATES))
|
||||
*aResult = MSG_FLAG_READ;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -5076,15 +5076,13 @@ void nsImapProtocol::OnAppendMsgFromFile()
|
||||
char *mailboxName = OnCreateServerSourceFolderPathString();
|
||||
if (mailboxName)
|
||||
{
|
||||
imapMessageFlagsType flagsToSet = kImapMsgSeenFlag;
|
||||
// we assume msg is read, for appending to sent/drafts folder, because
|
||||
// in that case, we don't have a msg hdr (and we want the msg to be read)
|
||||
PRUint32 msgFlags = MSG_FLAG_READ;
|
||||
imapMessageFlagsType flagsToSet = 0;
|
||||
PRUint32 msgFlags = 0;
|
||||
if (m_imapMessageSink)
|
||||
m_imapMessageSink->GetCurMoveCopyMessageFlags(m_runningUrl, &msgFlags);
|
||||
|
||||
if (!(msgFlags & MSG_FLAG_READ))
|
||||
flagsToSet &= ~kImapMsgSeenFlag;
|
||||
if (msgFlags & MSG_FLAG_READ)
|
||||
flagsToSet |= kImapMsgSeenFlag;
|
||||
if (msgFlags & MSG_FLAG_MDN_REPORT_SENT)
|
||||
flagsToSet |= kImapMsgMDNSentFlag;
|
||||
// convert msg flag label (0xE000000) to imap flag label (0x0E00)
|
||||
|
Loading…
x
Reference in New Issue
Block a user