- 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:
@@ -192,8 +192,6 @@ FetchMinMessageCommand::Command()
|
|||||||
bool
|
bool
|
||||||
FetchMinMessageCommand::Handle(const BString& response)
|
FetchMinMessageCommand::Handle(const BString& response)
|
||||||
{
|
{
|
||||||
if (response.FindFirst("FETCH") < 0)
|
|
||||||
return false;
|
|
||||||
BString extracted = response;
|
BString extracted = response;
|
||||||
int32 message;
|
int32 message;
|
||||||
if (!IMAPParser::RemoveUntagedFromLeft(extracted, "FETCH", message))
|
if (!IMAPParser::RemoveUntagedFromLeft(extracted, "FETCH", message))
|
||||||
@@ -210,6 +208,9 @@ FetchMinMessageCommand::Handle(const BString& response)
|
|||||||
if (!ParseMinMessage(extracted, minMessage))
|
if (!ParseMinMessage(extracted, minMessage))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if ((minMessage.flags & kDeleted) != 0)
|
||||||
|
return true;
|
||||||
|
|
||||||
fMinMessageList->push_back(minMessage);
|
fMinMessageList->push_back(minMessage);
|
||||||
fStorage.AddNewMessage(minMessage.uid, minMessage.flags, fData);
|
fStorage.AddNewMessage(minMessage.uid, minMessage.flags, fData);
|
||||||
return true;
|
return true;
|
||||||
@@ -284,8 +285,6 @@ FetchMessageListCommand::Command()
|
|||||||
bool
|
bool
|
||||||
FetchMessageListCommand::Handle(const BString& response)
|
FetchMessageListCommand::Handle(const BString& response)
|
||||||
{
|
{
|
||||||
if (response.FindFirst("FETCH") < 0)
|
|
||||||
return false;
|
|
||||||
BString extracted = response;
|
BString extracted = response;
|
||||||
int32 message;
|
int32 message;
|
||||||
if (!IMAPParser::RemoveUntagedFromLeft(extracted, "FETCH", message))
|
if (!IMAPParser::RemoveUntagedFromLeft(extracted, "FETCH", message))
|
||||||
@@ -295,6 +294,9 @@ FetchMessageListCommand::Handle(const BString& response)
|
|||||||
if (!FetchMinMessageCommand::ParseMinMessage(extracted, minMessage))
|
if (!FetchMinMessageCommand::ParseMinMessage(extracted, minMessage))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if ((minMessage.flags & kDeleted) != 0)
|
||||||
|
return true;
|
||||||
|
|
||||||
fMinMessageList->push_back(minMessage);
|
fMinMessageList->push_back(minMessage);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -345,8 +347,6 @@ FetchMessageCommand::Command()
|
|||||||
bool
|
bool
|
||||||
FetchMessageCommand::Handle(const BString& response)
|
FetchMessageCommand::Handle(const BString& response)
|
||||||
{
|
{
|
||||||
if (response.FindFirst("FETCH") < 0)
|
|
||||||
return false;
|
|
||||||
BString extracted = response;
|
BString extracted = response;
|
||||||
int32 message;
|
int32 message;
|
||||||
if (!IMAPParser::RemoveUntagedFromLeft(extracted, "FETCH", message))
|
if (!IMAPParser::RemoveUntagedFromLeft(extracted, "FETCH", message))
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ IMAPMailbox::StartWatchingMailbox()
|
|||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
atomic_set(&fWatching, 0);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user