mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-19 01:10:22 +00:00
don't set the "junkscore" string attribute directly, since it won't notify the view
that the key has changed. bug #169638. instead, go through the db. r/sr=bienvenu, a=asa
This commit is contained in:
parent
27616f8e73
commit
8ef569b776
@ -7115,7 +7115,12 @@ nsImapMailFolder::OnMessageClassified(const char *aMsgURL, nsMsgJunkStatus aClas
|
||||
nsCOMPtr <nsIMsgDBHdr> msgHdr;
|
||||
rv = GetMsgDBHdrFromURI(aMsgURL, getter_AddRefs(msgHdr));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
msgHdr->SetStringProperty("junkscore", (aClassification == nsIJunkMailPlugin::JUNK) ? "100" : "0");
|
||||
|
||||
nsMsgKey msgKey;
|
||||
rv = msgHdr->GetMessageKey(&msgKey);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
mDatabase->SetStringProperty(msgKey, "junkscore", (aClassification == nsIJunkMailPlugin::JUNK) ? "100" : "0");
|
||||
|
||||
if (aClassification == nsIJunkMailPlugin::JUNK)
|
||||
{
|
||||
@ -7138,8 +7143,6 @@ nsImapMailFolder::OnMessageClassified(const char *aMsgURL, nsMsgJunkStatus aClas
|
||||
spamSettings->GetSpamFolderURI(getter_Copies(spamFolderURI));
|
||||
if (!spamFolderURI.IsEmpty())
|
||||
{
|
||||
nsMsgKey msgKey;
|
||||
msgHdr->GetMessageKey(&msgKey);
|
||||
nsCOMPtr <nsIRDFService> rdfService = do_GetService("@mozilla.org/rdf/rdf-service;1",&rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -3392,7 +3392,13 @@ nsMsgLocalMailFolder::OnMessageClassified(const char *aMsgURL, nsMsgJunkStatus a
|
||||
nsCOMPtr <nsIMsgDBHdr> msgHdr;
|
||||
rv = GetMsgDBHdrFromURI(aMsgURL, getter_AddRefs(msgHdr));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
msgHdr->SetStringProperty("junkscore", (aClassification == nsIJunkMailPlugin::JUNK) ? "100" : "0");
|
||||
|
||||
nsMsgKey msgKey;
|
||||
rv = msgHdr->GetMessageKey(&msgKey);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
mDatabase->SetStringProperty(msgKey, "junkscore", (aClassification == nsIJunkMailPlugin::JUNK) ? "100" : "0");
|
||||
|
||||
nsCOMPtr<nsISpamSettings> spamSettings;
|
||||
nsXPIDLCString spamFolderURI;
|
||||
PRBool moveOnSpam = PR_FALSE;
|
||||
@ -3411,8 +3417,6 @@ nsMsgLocalMailFolder::OnMessageClassified(const char *aMsgURL, nsMsgJunkStatus a
|
||||
spamSettings->GetMoveOnSpam(&moveOnSpam);
|
||||
if (moveOnSpam)
|
||||
{
|
||||
nsMsgKey msgKey;
|
||||
msgHdr->GetMessageKey(&msgKey);
|
||||
mSpamKeysToMove.Add(msgKey);
|
||||
willMoveMessage = PR_TRUE;
|
||||
}
|
||||
@ -3426,8 +3430,6 @@ nsMsgLocalMailFolder::OnMessageClassified(const char *aMsgURL, nsMsgJunkStatus a
|
||||
spamSettings->GetSpamFolderURI(getter_Copies(spamFolderURI));
|
||||
if (!spamFolderURI.IsEmpty())
|
||||
{
|
||||
nsMsgKey msgKey;
|
||||
msgHdr->GetMessageKey(&msgKey);
|
||||
nsCOMPtr <nsIRDFService> rdfService = do_GetService("@mozilla.org/rdf/rdf-service;1",&rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user