mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-14 14:10:27 -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()) {
|
for (String uid : mData.keySet()) {
|
||||||
HashMap<String, String> data = mData.get(uid);
|
HashMap<String, String> data = mData.get(uid);
|
||||||
String readStatus = data.get("read");
|
String readStatus = data.get("read");
|
||||||
if (readStatus != null &&
|
if (readStatus != null && !readStatus.equals("")) {
|
||||||
!readStatus.equals("")) {
|
|
||||||
Boolean value = !readStatus.equals("0");
|
Boolean value = !readStatus.equals("0");
|
||||||
uidToRead.put(uid, value);
|
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