When fetching the message body also fetch the flags in one go. For example, gmail does not send flag change updates. If a message is
marked as read by another client the haiku client at least updates the flags and mark it as read when fetching the body. Thats the way Opera is doing it. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41018 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6339610f44
commit
165991b56a
@ -454,7 +454,7 @@ FetchBodyCommand::Command()
|
||||
{
|
||||
BString command = "FETCH ";
|
||||
command << fMessage;
|
||||
command += " BODY.PEEK[TEXT]";
|
||||
command += " (FLAGS BODY.PEEK[TEXT])";
|
||||
return command;
|
||||
}
|
||||
|
||||
@ -464,14 +464,17 @@ FetchBodyCommand::Handle(const BString& response)
|
||||
{
|
||||
if (response.FindFirst("FETCH") < 0)
|
||||
return false;
|
||||
|
||||
BString extracted = response;
|
||||
int32 message;
|
||||
if (!IMAPParser::RemoveUntagedFromLeft(extracted, "FETCH", message))
|
||||
return false;
|
||||
|
||||
if (message != fMessage)
|
||||
return false;
|
||||
|
||||
int32 flags = FetchMinMessageCommand::ExtractFlags(extracted);
|
||||
fStorage.SetFlags(fIMAPMailbox.MessageNumberToUID(message), flags);
|
||||
|
||||
int32 textPos = extracted.FindFirst("BODY[TEXT]");
|
||||
if (textPos < 0)
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user