diff options
author | Alex Ning <chineseperson5@gmail.com> | 2020-08-17 03:31:33 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2020-08-17 03:31:33 +0000 |
commit | d0c30609ae931081793f9443e1d589dcaf9a75f5 (patch) | |
tree | 063ff78078b44bc50ca68c8014564e4cc89c9411 | |
parent | 44a4fa16dc4ba24a68c81bc3abfbc16e97923c9c (diff) | |
download | infinity-for-reddit-d0c30609ae931081793f9443e1d589dcaf9a75f5.tar infinity-for-reddit-d0c30609ae931081793f9443e1d589dcaf9a75f5.tar.gz infinity-for-reddit-d0c30609ae931081793f9443e1d589dcaf9a75f5.tar.bz2 infinity-for-reddit-d0c30609ae931081793f9443e1d589dcaf9a75f5.tar.lz infinity-for-reddit-d0c30609ae931081793f9443e1d589dcaf9a75f5.tar.xz infinity-for-reddit-d0c30609ae931081793f9443e1d589dcaf9a75f5.tar.zst infinity-for-reddit-d0c30609ae931081793f9443e1d589dcaf9a75f5.zip |
Hide post content if a post is marked as spoiler in PostRecyclerViewAdapter.
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java index 3561abfa..c9cf8e96 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java @@ -607,7 +607,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView ((PostGalleryTypeViewHolder) holder).noPreviewLinkImageView.setVisibility(View.VISIBLE); } } else if (holder instanceof PostTextTypeViewHolder) { - if (post.getSelfTextPlainTrimmed() != null && !post.getSelfTextPlainTrimmed().equals("")) { + if (!post.isSpoiler() && post.getSelfTextPlainTrimmed() != null && !post.getSelfTextPlainTrimmed().equals("")) { ((PostTextTypeViewHolder) holder).contentTextView.setVisibility(View.VISIBLE); ((PostTextTypeViewHolder) holder).contentTextView.setText(post.getSelfTextPlainTrimmed()); } @@ -1178,6 +1178,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView ((PostGalleryTypeViewHolder) holder).errorRelativeLayout.setVisibility(View.GONE); ((PostGalleryTypeViewHolder) holder).noPreviewLinkImageView.setVisibility(View.GONE); } else if (holder instanceof PostTextTypeViewHolder) { + ((PostTextTypeViewHolder) holder).contentTextView.setText(""); ((PostTextTypeViewHolder) holder).contentTextView.setVisibility(View.GONE); } |