Bug 1633205 - Pay attention to HasRe flag in nsImapMailFolder::SetPendingAttributes() and nsMsgLocalMailFolder::EndCopy(). r=benc DONTBUILD
This commit is contained in:
Родитель
3bc1da3685
Коммит
ccdb16a068
|
@ -6918,6 +6918,15 @@ void nsImapMailFolder::SetPendingAttributes(
|
|||
sourceString.get());
|
||||
}
|
||||
|
||||
// Carry over HasRe flag.
|
||||
uint32_t flags;
|
||||
uint32_t storeFlags = 0;
|
||||
msgDBHdr->GetFlags(&flags);
|
||||
if (flags & nsMsgMessageFlags::HasRe) {
|
||||
storeFlags = nsMsgMessageFlags::HasRe;
|
||||
mDatabase->SetUint32AttributeOnPendingHdr(msgDBHdr, "flags", storeFlags);
|
||||
}
|
||||
|
||||
uint32_t messageSize;
|
||||
uint64_t messageOffset;
|
||||
nsCString storeToken;
|
||||
|
@ -6933,8 +6942,8 @@ void nsImapMailFolder::SetPendingAttributes(
|
|||
// here because it can cause missing parts (inline or attachments)
|
||||
// when messages are moved or copied manually or by filter action.
|
||||
if (aSetOffline)
|
||||
mDatabase->SetUint32AttributeOnPendingHdr(msgDBHdr, "flags",
|
||||
nsMsgMessageFlags::Offline);
|
||||
mDatabase->SetUint32AttributeOnPendingHdr(
|
||||
msgDBHdr, "flags", storeFlags | nsMsgMessageFlags::Offline);
|
||||
mDatabase->SetAttributeOnPendingHdr(msgDBHdr, "storeToken",
|
||||
storeToken.get());
|
||||
}
|
||||
|
|
|
@ -2248,14 +2248,17 @@ nsMsgLocalMailFolder::EndCopy(bool aCopySucceeded) {
|
|||
// Flags may get changed when deleting the original source message in
|
||||
// IMAP. We have a copy of the original flags, but parseMsgState has
|
||||
// already tried to decide what those flags should be. Who to believe?
|
||||
// Let's only deal here with the flags that might get changed, Read
|
||||
// and New, and trust upstream code for everything else.
|
||||
uint32_t readAndNew =
|
||||
nsMsgMessageFlags::New | nsMsgMessageFlags::Read;
|
||||
// Let's deal here with the flags that might get changed, Read and
|
||||
// New, and trust upstream code for everything else. However,
|
||||
// we need to carry over HasRe since the subject is copied over
|
||||
// from the original.
|
||||
uint32_t carryOver = nsMsgMessageFlags::New |
|
||||
nsMsgMessageFlags::Read |
|
||||
nsMsgMessageFlags::HasRe;
|
||||
uint32_t newFlags;
|
||||
newHdr->GetFlags(&newFlags);
|
||||
newHdr->SetFlags((newFlags & ~readAndNew) |
|
||||
((mCopyState->m_flags) & readAndNew));
|
||||
newHdr->SetFlags((newFlags & ~carryOver) |
|
||||
((mCopyState->m_flags) & carryOver));
|
||||
|
||||
// Copy other message properties.
|
||||
CopyPropertiesToMsgHdr(newHdr, mCopyState->m_message,
|
||||
|
|
Загрузка…
Ссылка в новой задаче