diff options
author | Docile-Alligator <chineseperson5@gmail.com> | 2021-12-07 13:11:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-07 13:11:20 +0000 |
commit | 8fea6f688a764308737d8607655586d6047e4813 (patch) | |
tree | 2d388a3ba0a71735efad24b3ff83143096ac7044 /app | |
parent | e3ac6d07718e40f3828bd5da3652b0eb4c0a68b9 (diff) | |
parent | 619d6b846a5422298eca016e6e4515737b8bed93 (diff) | |
download | infinity-for-reddit-8fea6f688a764308737d8607655586d6047e4813.tar infinity-for-reddit-8fea6f688a764308737d8607655586d6047e4813.tar.gz infinity-for-reddit-8fea6f688a764308737d8607655586d6047e4813.tar.bz2 infinity-for-reddit-8fea6f688a764308737d8607655586d6047e4813.tar.lz infinity-for-reddit-8fea6f688a764308737d8607655586d6047e4813.tar.xz infinity-for-reddit-8fea6f688a764308737d8607655586d6047e4813.tar.zst infinity-for-reddit-8fea6f688a764308737d8607655586d6047e4813.zip |
Merge pull request #571 from scria1000/patch-2
Add null check for GALLERY_DATA_KEY
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/post/ParsePost.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/post/ParsePost.java b/app/src/main/java/ml/docilealligator/infinityforreddit/post/ParsePost.java index 0685170a..834db92f 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/post/ParsePost.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/post/ParsePost.java @@ -541,7 +541,7 @@ public class ParsePost { } } catch (IllegalArgumentException ignore) { } } else if (post.getPostType() == Post.LINK_TYPE || post.getPostType() == Post.NO_PREVIEW_LINK_TYPE) { - if (data.has(JSONUtils.GALLERY_DATA_KEY)) { + if (!data.isNull(JSONUtils.GALLERY_DATA_KEY)) { JSONArray galleryIdsArray = data.getJSONObject(JSONUtils.GALLERY_DATA_KEY).getJSONArray(JSONUtils.ITEMS_KEY); JSONObject galleryObject = data.getJSONObject(JSONUtils.MEDIA_METADATA_KEY); ArrayList<Post.Gallery> gallery = new ArrayList<>(); |