when filter after the fact filter sets a label on a local message, it's not stored in the mailbox, only the summary file sr=mscott a=chofmann 226952

This commit is contained in:
bienvenu%nventure.com 2004-04-07 15:11:51 +00:00
parent 02f0afb781
commit 16565491ef

View File

@ -3848,6 +3848,9 @@ nsMsgDBFolder::MarkMessagesFlagged(nsISupportsArray *messages, PRBool markFlagge
NS_IMETHODIMP
nsMsgDBFolder::SetLabelForMessages(nsISupportsArray *aMessages, nsMsgLabelValue aLabel)
{
GetDatabase(nsnull);
if (mDatabase)
{
PRUint32 count;
NS_ENSURE_ARG(aMessages);
nsresult rv = aMessages->Count(&count);
@ -3855,11 +3858,13 @@ nsMsgDBFolder::SetLabelForMessages(nsISupportsArray *aMessages, nsMsgLabelValue
for(PRUint32 i = 0; i < count; i++)
{
nsMsgKey msgKey;
nsCOMPtr<nsIMsgDBHdr> message = do_QueryElementAt(aMessages, i, &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = message->SetLabel(aLabel);
(void) message->GetMessageKey(&msgKey);
rv = mDatabase->SetLabel(msgKey, aLabel);
NS_ENSURE_SUCCESS(rv, rv);
}
}
return NS_OK;
}