зеркало из https://github.com/mozilla/gecko-dev.git
fix for bug #191042.
clear the custom flags for the message otherwise the old custom flags will stay around thanks to ere@atp.fi (Ere Maijala) for the fix. r/sr=sspitzer
This commit is contained in:
Родитель
ea3fcd2e6a
Коммит
39faff3252
|
@ -50,5 +50,6 @@ interface nsIImapFlagAndUidState : nsISupports
|
|||
string getCustomFlags(in unsigned long uid); // returns space-separated keywords
|
||||
void Reset(in unsigned long howManyLeft);
|
||||
void SetSupportedUserFlags(in unsigned short flags);
|
||||
void clearCustomFlags(in unsigned long uid);
|
||||
};
|
||||
|
||||
|
|
|
@ -408,3 +408,14 @@ NS_IMETHODIMP nsImapFlagAndUidState::GetCustomFlags(PRUint32 uid, char **customF
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsImapFlagAndUidState::ClearCustomFlags(PRUint32 uid)
|
||||
{
|
||||
nsAutoCMonitor(this);
|
||||
if (m_customFlagsHash)
|
||||
{
|
||||
nsPRUint32Key hashKey(uid);
|
||||
m_customFlagsHash->Remove(&hashKey);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -1526,6 +1526,13 @@ void nsImapServerResponseParser::flags()
|
|||
{
|
||||
imapMessageFlagsType messageFlags = kNoImapMsgFlag;
|
||||
fCustomFlags.Clear();
|
||||
|
||||
// clear the custom flags for this message
|
||||
// otherwise the old custom flags will stay around
|
||||
// see bug #191042
|
||||
if (fFlagState && CurrentResponseUID() != nsMsgKey_None)
|
||||
fFlagState->ClearCustomFlags(CurrentResponseUID());
|
||||
|
||||
// eat the opening '('
|
||||
fNextToken++;
|
||||
while (ContinueParse() && (*fNextToken != ')'))
|
||||
|
|
Загрузка…
Ссылка в новой задаче