mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 13:29:50 +02:00
Add null check in tryMarkingPostAsRead() in ViewPostDetailFragment.
This commit is contained in:
@@ -1094,7 +1094,7 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void tryMarkingPostAsRead() {
|
private void tryMarkingPostAsRead() {
|
||||||
if (mMarkPostsAsRead && !mPost.isRead()) {
|
if (mMarkPostsAsRead && mPost != null && !mPost.isRead()) {
|
||||||
mPost.markAsRead(true);
|
mPost.markAsRead(true);
|
||||||
InsertReadPost.insertReadPost(mRedditDataRoomDatabase, mExecutor, mAccountName, mPost.getId());
|
InsertReadPost.insertReadPost(mRedditDataRoomDatabase, mExecutor, mAccountName, mPost.getId());
|
||||||
EventBus.getDefault().post(new PostUpdateEventToPostList(mPost, postListPosition));
|
EventBus.getDefault().post(new PostUpdateEventToPostList(mPost, postListPosition));
|
||||||
|
Reference in New Issue
Block a user