зеркало из https://github.com/mozilla/gecko-dev.git
fix problem with imap messages arriving out of order, r=jefft,mscott 40701
This commit is contained in:
Родитель
2e71c24a0b
Коммит
b9c1f9cd75
|
@ -298,8 +298,15 @@ imapMessageFlagsType nsImapFlagAndUidState::GetMessageFlagsFromUID(PRUint32 uid,
|
|||
lo = msgIndex + 1;
|
||||
}
|
||||
msgIndex = lo;
|
||||
while ((msgIndex > 0) && (fUids[msgIndex] > (PRUint32) uid))
|
||||
// leave msgIndex pointing to the first slot with a value > uid
|
||||
// first, move it before any ids that are > (shouldn't happen).
|
||||
while ((msgIndex > 0) && (fUids[msgIndex - 1] > (PRUint32) uid))
|
||||
msgIndex--;
|
||||
|
||||
// next, move msgIndex up to the first slot > than uid.
|
||||
while ((PRUint32) uid < fUids[msgIndex])
|
||||
msgIndex++;
|
||||
|
||||
if (msgIndex < 0)
|
||||
msgIndex = 0;
|
||||
*ndx = msgIndex;
|
||||
|
|
|
@ -2482,7 +2482,7 @@ void nsImapMailFolder::FindKeysToAdd(const nsMsgKeyArray &existingKeys, nsMsgKey
|
|||
|
||||
imapMessageFlagsType flags;
|
||||
flagState->GetMessageFlags(flagIndex, &flags);
|
||||
if (showDeletedMessages || ! (flags & kImapMsgDeletedFlag))
|
||||
if (uidOfMessage != nsMsgKey_None &&showDeletedMessages || ! (flags & kImapMsgDeletedFlag))
|
||||
{
|
||||
keysToFetch.Add(uidOfMessage);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче