Merge change 23669 into eclair
* changes: Cleaner way to fix the -1 count problem (and removing an Eclipse warning along the way).
This commit is contained in:
@@ -1548,11 +1548,12 @@ public final class Gmail {
|
|||||||
getLabelIdValues(labelId).getAsInteger(LabelColumns.NUM_UNREAD_CONVERSATIONS);
|
getLabelIdValues(labelId).getAsInteger(LabelColumns.NUM_UNREAD_CONVERSATIONS);
|
||||||
// There seems to be a race condition here that can get the label maps into a bad
|
// There seems to be a race condition here that can get the label maps into a bad
|
||||||
// state and lose state on a particular label.
|
// state and lose state on a particular label.
|
||||||
if (unreadConversations == null) {
|
int result = 0;
|
||||||
return 0;
|
if (unreadConversations != null) {
|
||||||
} else {
|
result = unreadConversations < 0 ? 0 : unreadConversations;
|
||||||
return unreadConversations < 0 ? 0 : unreadConversations;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user