From 7ee99288e0ff479a16fa61077c43cecef3d1aa52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 25 Aug 2024 23:23:44 +0200 Subject: [PATCH] Don't display sensitive content overlay when not needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- src/components/quoted-status.tsx | 10 +++++----- src/components/status.tsx | 18 +++++++++++------- .../status/components/detailed-status.tsx | 11 +++++++---- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/components/quoted-status.tsx b/src/components/quoted-status.tsx index dc89a282e..7e4e297d2 100644 --- a/src/components/quoted-status.tsx +++ b/src/components/quoted-status.tsx @@ -104,12 +104,12 @@ const QuotedStatus: React.FC = ({ status, onCancel, compose }) => {status.quote_id && } -
- - {status.media_attachments.length > 0 && ( + {status.media_attachments.length > 0 && ( +
+ - )} -
+
+ )} )} diff --git a/src/components/status.tsx b/src/components/status.tsx index 996cd3304..d27a45368 100644 --- a/src/components/status.tsx +++ b/src/components/status.tsx @@ -427,13 +427,17 @@ const Status: React.FC = (props) => { {(quote || actualStatus.card || actualStatus.media_attachments.length > 0) && ( - - - + + {actualStatus.media_attachments.length > 0 && ( +
+ + +
+ )} {quote}
diff --git a/src/features/status/components/detailed-status.tsx b/src/features/status/components/detailed-status.tsx index be5a56c36..d90b74e5f 100644 --- a/src/features/status/components/detailed-status.tsx +++ b/src/features/status/components/detailed-status.tsx @@ -126,10 +126,13 @@ const DetailedStatus: React.FC = ({ {(withMedia && (quote || actualStatus.card || actualStatus.media_attachments.length > 0)) && ( - - - - + + {actualStatus.media_attachments.length > 0 && ( +
+ + +
+ )} {quote}