- Don't download messages flaged as deleted.

- Set watching variable when leaving the watching method.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40635 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler
2011-02-23 02:25:22 +00:00
parent 14afc67b4c
commit 73da57481b
2 changed files with 7 additions and 6 deletions
@@ -192,8 +192,6 @@ FetchMinMessageCommand::Command()
bool
FetchMinMessageCommand::Handle(const BString& response)
{
if (response.FindFirst("FETCH") < 0)
return false;
BString extracted = response;
int32 message;
if (!IMAPParser::RemoveUntagedFromLeft(extracted, "FETCH", message))
@@ -210,6 +208,9 @@ FetchMinMessageCommand::Handle(const BString& response)
if (!ParseMinMessage(extracted, minMessage))
return false;
if ((minMessage.flags & kDeleted) != 0)
return true;
fMinMessageList->push_back(minMessage);
fStorage.AddNewMessage(minMessage.uid, minMessage.flags, fData);
return true;
@@ -284,8 +285,6 @@ FetchMessageListCommand::Command()
bool
FetchMessageListCommand::Handle(const BString& response)
{
if (response.FindFirst("FETCH") < 0)
return false;
BString extracted = response;
int32 message;
if (!IMAPParser::RemoveUntagedFromLeft(extracted, "FETCH", message))
@@ -295,6 +294,9 @@ FetchMessageListCommand::Handle(const BString& response)
if (!FetchMinMessageCommand::ParseMinMessage(extracted, minMessage))
return false;
if ((minMessage.flags & kDeleted) != 0)
return true;
fMinMessageList->push_back(minMessage);
return true;
}
@@ -345,8 +347,6 @@ FetchMessageCommand::Command()
bool
FetchMessageCommand::Handle(const BString& response)
{
if (response.FindFirst("FETCH") < 0)
return false;
BString extracted = response;
int32 message;
if (!IMAPParser::RemoveUntagedFromLeft(extracted, "FETCH", message))
@@ -157,6 +157,7 @@ IMAPMailbox::StartWatchingMailbox()
if (status != B_OK)
break;
}
atomic_set(&fWatching, 0);
return status;
}