From aa45683a4f8f097f77c6161d8c8042017877bf9a Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 16 Jan 2024 10:46:09 +0100 Subject: [PATCH] Fix issue #1016 - Content Warning not applied to quoted messages --- .../app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ea37cb11..984e6902 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 @@ -481,7 +481,7 @@ public class StatusAdapter extends RecyclerView.Adapter String loadMediaType = sharedpreferences.getString(context.getString(R.string.SET_LOAD_MEDIA_TYPE), "ALWAYS"); - if (statusToDeal.quote != null) { + if (statusToDeal.quote != null && (statusToDeal.spoiler_text == null || statusToDeal.spoiler_text.trim().isEmpty() || statusToDeal.isExpended)) { holder.binding.quotedMessage.cardviewContainer.setCardElevation((int) Helper.convertDpToPixel(5, context)); holder.binding.quotedMessage.dividerCard.setVisibility(View.GONE); holder.binding.quotedMessage.cardviewContainer.setStrokeWidth((int) Helper.convertDpToPixel(1, context)); @@ -1466,6 +1466,7 @@ public class StatusAdapter extends RecyclerView.Adapter } } else { holder.binding.statusContent.setVisibility(View.GONE); + holder.binding.quotedMessage.cardviewContainer.setVisibility(View.GONE); holder.binding.mediaContainer.setVisibility(View.GONE); holder.binding.card.setVisibility(View.GONE); }