mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-29 04:17:12 +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() {
|
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));
|
||||||
|
Loading…
Reference in New Issue
Block a user