make sure link preview card is not shown when cw is collapsed (#4218)

The sensitive flag indicates sensitive media, but we want to check if
there is a contentwarning on the post. I think statuses that have a
contentwarning but no sensitive flag are rare so we never noticed this
bug.

closes #4201
This commit is contained in:
Konrad Pozniak 2024-01-28 19:07:51 +01:00 committed by GitHub
parent 0b9f61c100
commit 0c2b8b114b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1104,7 +1104,7 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
actionable.getPoll() == null &&
card != null &&
!TextUtils.isEmpty(card.getUrl()) &&
(!actionable.getSensitive() || expanded) &&
(TextUtils.isEmpty(actionable.getSpoilerText()) || expanded) &&
(!status.isCollapsible() || !status.isCollapsed())) {
cardView.setVisibility(View.VISIBLE);