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 + + + + )} + )} ); }