mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 21:39:50 +02:00
Hide post content if a post is marked as spoiler in PostRecyclerViewAdapter.
This commit is contained in:
@@ -607,7 +607,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
|
|||||||
((PostGalleryTypeViewHolder) holder).noPreviewLinkImageView.setVisibility(View.VISIBLE);
|
((PostGalleryTypeViewHolder) holder).noPreviewLinkImageView.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
} else if (holder instanceof PostTextTypeViewHolder) {
|
} 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.setVisibility(View.VISIBLE);
|
||||||
((PostTextTypeViewHolder) holder).contentTextView.setText(post.getSelfTextPlainTrimmed());
|
((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).errorRelativeLayout.setVisibility(View.GONE);
|
||||||
((PostGalleryTypeViewHolder) holder).noPreviewLinkImageView.setVisibility(View.GONE);
|
((PostGalleryTypeViewHolder) holder).noPreviewLinkImageView.setVisibility(View.GONE);
|
||||||
} else if (holder instanceof PostTextTypeViewHolder) {
|
} else if (holder instanceof PostTextTypeViewHolder) {
|
||||||
|
((PostTextTypeViewHolder) holder).contentTextView.setText("");
|
||||||
((PostTextTypeViewHolder) holder).contentTextView.setVisibility(View.GONE);
|
((PostTextTypeViewHolder) holder).contentTextView.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user