diff --git a/ts/components/CompositionArea.tsx b/ts/components/CompositionArea.tsx index 9b50d8c87..0f6e33b32 100644 --- a/ts/components/CompositionArea.tsx +++ b/ts/components/CompositionArea.tsx @@ -58,7 +58,6 @@ import { import { MediaEditor } from './MediaEditor'; import { IMAGE_PNG } from '../types/MIME'; import { isImageTypeSupported } from '../util/GoogleChrome'; -import { canEditImages } from '../util/canEditImages'; export type CompositionAPIType = | { @@ -293,13 +292,8 @@ export const CompositionArea = ({ } }, []); - const hasImageEditingEnabled = canEditImages(); - function maybeEditAttachment(attachment: AttachmentDraftType) { - if ( - !hasImageEditingEnabled || - !isImageTypeSupported(attachment.contentType) - ) { + if (!isImageTypeSupported(attachment.contentType)) { return; } @@ -647,7 +641,6 @@ export const CompositionArea = ({
{ }), ], }); - return ; + return ; }); story.add('Multiple Visual Attachments', () => { diff --git a/ts/components/conversation/AttachmentList.tsx b/ts/components/conversation/AttachmentList.tsx index a39d399e5..512fc9b7d 100644 --- a/ts/components/conversation/AttachmentList.tsx +++ b/ts/components/conversation/AttachmentList.tsx @@ -20,7 +20,6 @@ import { export type Props = Readonly<{ attachments: ReadonlyArray; - canEditImages?: boolean; i18n: LocalizerType; onAddAttachment?: () => void; onClickAttachment?: (attachment: T) => void; @@ -51,7 +50,6 @@ function getUrl( export const AttachmentList = ({ attachments, - canEditImages, i18n, onAddAttachment, onClickAttachment, @@ -121,7 +119,7 @@ export const AttachmentList = ({ /> ); - if (isImage && canEditImages) { + if (isImage) { return (
{imgElement} diff --git a/ts/util/canEditImages.ts b/ts/util/canEditImages.ts deleted file mode 100644 index 142afa047..000000000 --- a/ts/util/canEditImages.ts +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2021 Signal Messenger, LLC -// SPDX-License-Identifier: AGPL-3.0-only - -import { isEnabled } from '../RemoteConfig'; -import { getEnvironment, Environment } from '../environment'; -import { isBeta } from './version'; - -export function canEditImages(): boolean { - return ( - isEnabled('desktop.internalUser') || - getEnvironment() === Environment.Staging || - getEnvironment() === Environment.Development || - // eslint-disable-next-line @typescript-eslint/no-explicit-any - Boolean((window as any).STORYBOOK_ENV) || - isBeta(window.getVersion()) - ); -}