Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b85c9b7b authored by Jesse Vincent's avatar Jesse Vincent
Browse files

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
parent 98ae8cf2
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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);
                }
            }