From 2692c941e1cf775ba4fc6d6093861ab14946333d Mon Sep 17 00:00:00 2001 From: RoyceDa Date: Wed, 18 Feb 2026 20:30:07 +0200 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BD=D0=B0=20=D1=82?= =?UTF-8?q?=D0=B5=D0=BC=D0=BD=D0=B0=D1=8F=20=D0=BF=D0=BE=D0=B4=D0=BE=D0=BB?= =?UTF-8?q?=D0=B6=D0=BA=D0=B0=20=D1=83=20=D1=84=D0=BE=D1=82=D0=BE=D0=B3?= =?UTF-8?q?=D1=80=D0=B0=D1=84=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MessageAttachments/MessageImage.tsx | 84 +++++++++---------- 1 file changed, 41 insertions(+), 43 deletions(-) diff --git a/app/components/MessageAttachments/MessageImage.tsx b/app/components/MessageAttachments/MessageImage.tsx index d9247d3..5e22afe 100644 --- a/app/components/MessageAttachments/MessageImage.tsx +++ b/app/components/MessageAttachments/MessageImage.tsx @@ -13,12 +13,12 @@ import { DownloadStatus, useAttachment } from "@/app/providers/AttachmentProvide export function MessageImage(props: AttachmentProps) { const colors = useRosettaColors(); const { - downloadPercentage, - uploadedPercentage, - download, + downloadPercentage, + uploadedPercentage, + download, downloadStatus, getBlob, - getPreview} = useAttachment(props.attachment, props.chacha_key_plain); + getPreview } = useAttachment(props.attachment, props.chacha_key_plain); const mainRef = useRef(null); const error = downloadStatus == DownloadStatus.ERROR; const { open } = useImageViewer(); @@ -55,7 +55,6 @@ export function MessageImage(props: AttachmentProps) { return; } } - console.info(downloadStatus); return ( - - - {!error && ( - - {downloadPercentage > 0 ? ( - - ) : ( - - )} - - )} - {error && ( - - - Image expired - - - - )} - - )} @@ -149,6 +110,43 @@ export function MessageImage(props: AttachmentProps) { )} + + {(downloadStatus == DownloadStatus.NOT_DOWNLOADED || downloadStatus == DownloadStatus.DOWNLOADING) && ( + {!error && ( + + {downloadPercentage > 0 ? ( + + ) : ( + + )} + + )} + {error && ( + + + Image expired + + + + )} + )} ); }