1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-04 16:45:09 -05:00

It appears that Exchange is returning responses

without a visiblecount element for empty folders
Which resulted in this code returning -1 (as that was
the previous default.)
-1 is an error condition. Now the default is empty
This commit is contained in:
Jesse Vincent 2011-07-09 17:00:35 -04:00
parent 220be75473
commit d7dfba15cf

View File

@ -2166,7 +2166,12 @@ public class WebDavStore extends Store {
* Returns the message count as it was retrieved * Returns the message count as it was retrieved
*/ */
public int getMessageCount() { public int getMessageCount() {
int messageCount = -1; // It appears that Exchange is returning responses
// without a visiblecount element for empty folders
// Which resulted in this code returning -1 (as that was
// the previous default.)
// -1 is an error condition. Now the default is empty
int messageCount = 0;
for (String uid : mData.keySet()) { for (String uid : mData.keySet()) {
HashMap<String, String> data = mData.get(uid); HashMap<String, String> data = mData.get(uid);