From a0c61e5b4ab5c94915a50e2b3e64a2a4adfe5eac Mon Sep 17 00:00:00 2001 From: Josh Perez <60019601+josh-signal@users.noreply.github.com> Date: Wed, 2 Feb 2022 10:31:16 -0500 Subject: [PATCH] Only show image editing icon in composition area --- ts/components/CompositionArea.tsx | 1 + ts/components/conversation/AttachmentList.tsx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ts/components/CompositionArea.tsx b/ts/components/CompositionArea.tsx index 0f6e33b32b..2a658b8bc8 100644 --- a/ts/components/CompositionArea.tsx +++ b/ts/components/CompositionArea.tsx @@ -641,6 +641,7 @@ export const CompositionArea = ({
= Readonly<{ attachments: ReadonlyArray; + canEditImages?: boolean; i18n: LocalizerType; onAddAttachment?: () => void; onClickAttachment?: (attachment: T) => void; @@ -50,6 +51,7 @@ function getUrl( export const AttachmentList = ({ attachments, + canEditImages, i18n, onAddAttachment, onClickAttachment, @@ -119,7 +121,7 @@ export const AttachmentList = ({ /> ); - if (isImage) { + if (isImage && canEditImages) { return (
{imgElement}