diff options
author | Alex Ning <chineseperson5@gmail.com> | 2020-12-11 16:08:41 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2020-12-11 16:08:41 +0000 |
commit | 72fd7917af05959aca4a1dafd6b5e5936a0c450e (patch) | |
tree | c9b09dfc20b34a52ac271fe779d8ea2397b2eb99 /app/src | |
parent | 35ae9c547f316dfd7dd1bae7a582f98940440359 (diff) | |
download | infinity-for-reddit-72fd7917af05959aca4a1dafd6b5e5936a0c450e.tar infinity-for-reddit-72fd7917af05959aca4a1dafd6b5e5936a0c450e.tar.gz infinity-for-reddit-72fd7917af05959aca4a1dafd6b5e5936a0c450e.tar.bz2 infinity-for-reddit-72fd7917af05959aca4a1dafd6b5e5936a0c450e.tar.lz infinity-for-reddit-72fd7917af05959aca4a1dafd6b5e5936a0c450e.tar.xz infinity-for-reddit-72fd7917af05959aca4a1dafd6b5e5936a0c450e.tar.zst infinity-for-reddit-72fd7917af05959aca4a1dafd6b5e5936a0c450e.zip |
Disable marking posts as read if in anonymous mode.
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java index 8a8eef99..dd0ac7c8 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -1936,7 +1936,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView } void markPostRead(Post post) { - if (!post.isRead()) { + if (mAccessToken != null && !post.isRead()) { post.markAsRead(); cardView.setBackgroundTintList(ColorStateList.valueOf(mReadPostCardViewBackgroundColor)); titleTextView.setTextColor(mReadPostTitleColor); @@ -2991,7 +2991,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView } void markPostRead(Post post) { - if (!post.isRead()) { + if (mAccessToken != null && !post.isRead()) { post.markAsRead(); itemView.setBackgroundColor(mReadPostCardViewBackgroundColor); titleTextView.setTextColor(mReadPostTitleColor); |