зеркало из https://github.com/mozilla/gecko-dev.git
make imap filters after the fact run locally instead of on imap server, sr=mscott 278052
This commit is contained in:
Родитель
30dfb66312
Коммит
d24dc9cd66
|
@ -390,6 +390,8 @@ nsresult nsMsgFilterAfterTheFact::RunNextFilter()
|
|||
m_searchSession->UnregisterListener(this);
|
||||
m_searchSession = do_CreateInstance(NS_MSGSEARCHSESSION_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsMsgSearchScopeValue searchScope = nsMsgSearchScope::offlineMail;
|
||||
PRUint32 termCount;
|
||||
searchTerms->Count(&termCount);
|
||||
for (PRUint32 termIndex = 0; termIndex < termCount; termIndex++)
|
||||
|
@ -401,13 +403,7 @@ nsresult nsMsgFilterAfterTheFact::RunNextFilter()
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
m_searchSession->RegisterListener(this);
|
||||
// get incoming server for folder and get search scope from there.
|
||||
nsCOMPtr <nsIMsgIncomingServer> incomingServer;
|
||||
rv = m_curFolder->GetServer(getter_AddRefs(incomingServer));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsMsgSearchScopeValue searchScope;
|
||||
|
||||
incomingServer->GetSearchScope(&searchScope);
|
||||
rv = m_searchSession->AddScopeTerm(searchScope, m_curFolder);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
// it's possible that this error handling will need to be rearranged when mscott lands the UI for
|
||||
|
@ -752,7 +748,7 @@ nsresult nsMsgFilterAfterTheFact::ApplyFilter()
|
|||
m_searchHitHdrs->QueryElementAt(msgIndex, NS_GET_IID(nsIMsgDBHdr), getter_AddRefs(msgHdr));
|
||||
if (msgHdr)
|
||||
{
|
||||
PRUint32 flags = 0;
|
||||
PRUint32 flags = 0;
|
||||
msgHdr->GetFlags(&flags);
|
||||
if (flags & MSG_FLAG_PARTIAL)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче