зеркало из https://github.com/mozilla/gecko-dev.git
fix filters firing on read message, r=mscott, 17838
This commit is contained in:
Родитель
7529298eaf
Коммит
226efe3505
|
@ -1511,13 +1511,19 @@ NS_IMETHODIMP nsImapMailFolder::NormalEndHeaderParseStream(nsIImapProtocol*
|
||||||
// If this is the inbox, try to apply filters.
|
// If this is the inbox, try to apply filters.
|
||||||
if (mFlags & MSG_FOLDER_FLAG_INBOX)
|
if (mFlags & MSG_FOLDER_FLAG_INBOX)
|
||||||
{
|
{
|
||||||
rv = m_msgParser->GetAllHeaders(&headers, &headersSize);
|
PRUint32 msgFlags;
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv) && headers)
|
newMsgHdr->GetFlags(&msgFlags);
|
||||||
|
if (!(msgFlags & MSG_FLAG_READ)) // only fire on unread msgs
|
||||||
{
|
{
|
||||||
if (m_filterList)
|
rv = m_msgParser->GetAllHeaders(&headers, &headersSize);
|
||||||
m_filterList->ApplyFiltersToHdr(nsMsgFilterType::InboxRule, newMsgHdr, this, mDatabase,
|
|
||||||
headers, headersSize, this);
|
if (NS_SUCCEEDED(rv) && headers)
|
||||||
|
{
|
||||||
|
if (m_filterList)
|
||||||
|
m_filterList->ApplyFiltersToHdr(nsMsgFilterType::InboxRule, newMsgHdr, this, mDatabase,
|
||||||
|
headers, headersSize, this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// here we need to tweak flags from uid state..
|
// here we need to tweak flags from uid state..
|
||||||
|
|
Загрузка…
Ссылка в новой задаче