mirror of
https://github.com/Docile-Alligator/Infinity-For-Reddit.git
synced 2026-03-29 11:11:09 +00:00
Fix crash when parsing post with null readPostList value.
This commit is contained in:
@ -568,14 +568,17 @@ public class ParsePost {
|
||||
size = nPosts;
|
||||
}
|
||||
|
||||
HashSet<ReadPost> readPostHashSet = new HashSet<>(readPostList);
|
||||
HashSet<ReadPost> readPostHashSet = null;
|
||||
if (readPostList != null) {
|
||||
readPostHashSet = new HashSet<>(readPostList);
|
||||
}
|
||||
for (int i = 0; i < size; i++) {
|
||||
try {
|
||||
if (allData.getJSONObject(i).getString(JSONUtils.KIND_KEY).equals("t3")) {
|
||||
JSONObject data = allData.getJSONObject(i).getJSONObject(JSONUtils.DATA_KEY);
|
||||
Post post = parseBasicData(data);
|
||||
boolean availablePost = true;
|
||||
if (readPostHashSet.contains(ReadPost.convertPost(post))) {
|
||||
if (readPostHashSet != null && readPostHashSet.contains(ReadPost.convertPost(post))) {
|
||||
post.markAsRead();
|
||||
}
|
||||
if (subredditFilterList != null) {
|
||||
|
||||
Reference in New Issue
Block a user