From 68a9931b6f89dabe596dea815cf5ef73771bdb9e Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Mon, 15 Sep 2025 14:19:51 -0500 Subject: [PATCH] Fix MediaGridItem for undownloaded GIFs Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> --- .../conversation/media-gallery/MediaGridItem.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ts/components/conversation/media-gallery/MediaGridItem.tsx b/ts/components/conversation/media-gallery/MediaGridItem.tsx index 7c6e68d883..b312ecebdd 100644 --- a/ts/components/conversation/media-gallery/MediaGridItem.tsx +++ b/ts/components/conversation/media-gallery/MediaGridItem.tsx @@ -51,7 +51,7 @@ export function MediaGridItem(props: Props): JSX.Element { ); let label: string; - if (attachment.url || attachment.incrementalUrl) { + if (url != null) { label = i18n('icu:imageOpenAlt'); } else if (attachment.pending) { label = i18n('icu:cancelDownload'); @@ -84,7 +84,8 @@ type SpinnerOverlayProps = Readonly<{ function SpinnerOverlay(props: SpinnerOverlayProps): JSX.Element | undefined { const { attachment } = props; - if (attachment.url != null || attachment.incrementalUrl != null) { + const url = getUrl(attachment); + if (url != null) { return undefined; } @@ -131,8 +132,8 @@ type MetadataOverlayProps = Readonly<{ function MetadataOverlay(props: MetadataOverlayProps): JSX.Element | undefined { const { i18n, attachment } = props; - const canBeShown = - attachment.url != null || attachment.incrementalUrl != null; + const url = getUrl(attachment); + const canBeShown = url != null; if (canBeShown && !isGIF([attachment])) { return undefined; }