diff --git a/ts/components/conversation/Image.tsx b/ts/components/conversation/Image.tsx index 077e0fef45b..6ec8e88126b 100644 --- a/ts/components/conversation/Image.tsx +++ b/ts/components/conversation/Image.tsx @@ -14,8 +14,8 @@ import type { } from '../../types/Attachment'; import { defaultBlurHash, - isDownloadable, isIncremental, + isPermanentlyUndownloadable, isReadyToView, } from '../../types/Attachment'; import { ProgressCircle } from '../ProgressCircle'; @@ -191,10 +191,7 @@ export function Image({ ); const startDownloadButton = - startDownload && - !attachment.path && - !attachment.pending && - !isIncremental(attachment) ? ( + !attachment.path && !attachment.pending && !isIncremental(attachment) ? ( + ) : ( + startDownloadButton + ) + ) : null; + const spinner = isIncremental(attachment) || !cancelDownload ? undefined @@ -218,8 +234,6 @@ export function Image({ tabIndex, }); - const isMediaDownloadable = isDownloadable(attachment); - return (
{imageOrBlurHash} - {isMediaDownloadable ? ( - startDownloadButton - ) : ( - - )} + {startDownloadOrUnavailableButton} {spinner} {attachment.caption ? ( @@ -267,7 +269,7 @@ export function Image({ /> ) : null} {(attachment.path || isIncremental(attachment)) && - isMediaDownloadable && + !isUndownloadable && playIconOverlay ? (
@@ -290,9 +292,7 @@ export function Image({ style={curveStyles} /> ) : null} - {showVisualAttachment && - isReadyToView(attachment) && - isMediaDownloadable ? ( + {showVisualAttachment && isReadyToView(attachment) ? (