From b059b2d5033f41859b538abf954cfd1c9e9f7d75 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Thu, 4 Nov 2021 22:43:21 +0800 Subject: Version 5.1.0-beta2. Fix crash when hiding read posts. --- .../ml/docilealligator/infinityforreddit/fragments/PostFragment.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/src/main/java') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java index c578c437..4a9703f7 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java @@ -1704,6 +1704,9 @@ public class PostFragment extends Fragment implements FragmentCommunicator { } public void markPostAsRead(Post post) { + if (readPosts == null) { + readPosts = new ArrayList<>(); + } readPosts.add(post.getId()); } -- cgit v1.2.3