mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-13 21:15:08 -05:00
Reverted r2334 because the cause of the problem reported in issue 2078 seems to be different than initially thought.
This commit is contained in:
parent
8b9327c946
commit
4a3c205533
@ -924,30 +924,7 @@ public class ImapStore extends Store
|
||||
{
|
||||
if (ImapResponseParser.equalsIgnoreCase(response.get(0), "SEARCH"))
|
||||
{
|
||||
/*
|
||||
* At least one server software decided it'd be a nice challenge for
|
||||
* client implementations to return a message sequence number of 0 when
|
||||
* no matches were found. So we're doing some sanity checks on the
|
||||
* returned values before adding them to our message count.
|
||||
*
|
||||
* See issue 2078
|
||||
*/
|
||||
boolean invalidResponse = false;
|
||||
for (int i = 1, length = response.size(); i < length; i++)
|
||||
{
|
||||
if ("0".equals(response.get(i)))
|
||||
{
|
||||
invalidResponse = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
if (K9.DEBUG && invalidResponse)
|
||||
{
|
||||
Log.d(K9.LOG_TAG, "Invalid value found in SEARCH response.");
|
||||
}
|
||||
count += response.size() - 1;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
|
Loading…
Reference in New Issue
Block a user