From 740b42d5d36eb898cd197aa41d682aa5bd46947a Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 16 Feb 2023 17:20:50 +0100 Subject: [PATCH] Fix an issue with auto display hidden media --- .../fedilab/android/mastodon/ui/drawer/StatusAdapter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java index eb15ad91c..ffdab4564 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java @@ -1451,7 +1451,7 @@ public class StatusAdapter extends RecyclerView.Adapter }); } else { int mediaPosition = 1; - if (!fullAttachement) { + if (!fullAttachement || statusToDeal.sensitive) { int defaultHeight = (int) Helper.convertDpToPixel(300, context); if (measuredWidth > 0) { defaultHeight = (int) (measuredWidth * 3) / 4; @@ -1550,7 +1550,7 @@ public class StatusAdapter extends RecyclerView.Adapter } mediaPosition++; } - if (!fullAttachement || statusToDeal.sensitive) { + if (!fullAttachement || (statusToDeal.sensitive && !expand_media)) { holder.binding.mediaContainer.setVisibility(View.GONE); holder.binding.media.mediaContainer.setVisibility(View.VISIBLE); } else { @@ -2359,7 +2359,7 @@ public class StatusAdapter extends RecyclerView.Adapter } if (!isSensitive || expand_media) { requestBuilder = glideRequests.asDrawable(); - if (!fullAttachement) { + if (!fullAttachement || isSensitive) { if (placeholder != null) { requestBuilder = requestBuilder.placeholder(new BitmapDrawable(context.getResources(), placeholder)); }