From e5bbfc8c1e979768bc554c7c7e1e484696465a03 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 29 Jul 2021 14:01:43 +1000 Subject: [PATCH] transparency disabled if png and text are present --- ts/components/conversation/Message.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ts/components/conversation/Message.tsx b/ts/components/conversation/Message.tsx index 5a1c2b2a5..1ecd200e1 100644 --- a/ts/components/conversation/Message.tsx +++ b/ts/components/conversation/Message.tsx @@ -576,7 +576,7 @@ class MessageInner extends React.PureComponent { } public isShowingImage(): boolean { - const { attachments, previews } = this.props; + const { attachments, previews, text } = this.props; const { imageBroken } = this.state; if (imageBroken) { @@ -585,9 +585,10 @@ class MessageInner extends React.PureComponent { if (attachments && attachments.length) { const displayImage = canDisplayImage(attachments); - + const hasText = text?.length; return Boolean( displayImage && + !hasText && ((isImage(attachments) && hasImage(attachments)) || (isVideo(attachments) && hasVideoScreenshot(attachments))) );