mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-28 11:58:23 +01:00
Add null check in tryMarkingPostAsRead() in ViewPostDetailFragment.
This commit is contained in:
parent
5f4ecbbe88
commit
3482ab36e9
@ -1094,7 +1094,7 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic
|
||||
}
|
||||
|
||||
private void tryMarkingPostAsRead() {
|
||||
if (mMarkPostsAsRead && !mPost.isRead()) {
|
||||
if (mMarkPostsAsRead && mPost != null && !mPost.isRead()) {
|
||||
mPost.markAsRead(true);
|
||||
InsertReadPost.insertReadPost(mRedditDataRoomDatabase, mExecutor, mAccountName, mPost.getId());
|
||||
EventBus.getDefault().post(new PostUpdateEventToPostList(mPost, postListPosition));
|
||||
|
Loading…
Reference in New Issue
Block a user