mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-02-15 07:28:59 +00:00
Fix MediaGridItem for undownloaded GIFs
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user