mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-15 14:05:05 -05:00
Work around the fact that when we can't get read status for a message,
we'd end up with an NPE as we then queried the hashmap
This commit is contained in:
parent
98ae8cf2be
commit
b85c9b7b0e
@ -2124,10 +2124,14 @@ public class WebDavStore extends Store {
|
||||
for (String uid : mData.keySet()) {
|
||||
HashMap<String, String> data = mData.get(uid);
|
||||
String readStatus = data.get("read");
|
||||
if (readStatus != null &&
|
||||
!readStatus.equals("")) {
|
||||
if (readStatus != null && !readStatus.equals("")) {
|
||||
Boolean value = !readStatus.equals("0");
|
||||
uidToRead.put(uid, value);
|
||||
} else {
|
||||
// We don't actually want to have null values in our hashmap,
|
||||
// as it causes the calling code to crash with an NPE as it
|
||||
// does a lookup in the maap.
|
||||
uidToRead.put(uid, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user