Version 5.1.0-beta2. Fix crash when hiding read posts.

This commit is contained in:
Alex Ning 2021-11-04 22:43:21 +08:00
parent 9e19b6f092
commit b059b2d503
2 changed files with 5 additions and 2 deletions

View File

@ -6,8 +6,8 @@ android {
applicationId "ml.docilealligator.infinityforreddit" applicationId "ml.docilealligator.infinityforreddit"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 30 targetSdkVersion 30
versionCode 81 versionCode 82
versionName "5.1.0-beta1" versionName "5.1.0-beta2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions { javaCompileOptions {
annotationProcessorOptions { annotationProcessorOptions {

View File

@ -1704,6 +1704,9 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
} }
public void markPostAsRead(Post post) { public void markPostAsRead(Post post) {
if (readPosts == null) {
readPosts = new ArrayList<>();
}
readPosts.add(post.getId()); readPosts.add(post.getId());
} }