- {pending ? (
- url || blurHash ? (
-
- {url ? (
-

- ) : blurHash ? (
-
- ) : undefined}
-
-
- ) : (
-
-
-
- )
- ) : url ? (
-

- ) : resolvedBlurHash ? (
-
- ) : null}
- {caption ? (
+ {imageOrBlurHash}
+ {startDownloadButton}
+ {spinner}
+
+ {attachment.caption ? (

) : null}
- {!pending && !imgNotDownloaded && playIconOverlay ? (
-
-
+ {attachment.path && playIconOverlay ? (
+
) : null}
{overlayText ? (
@@ -247,22 +250,27 @@ export function Image({
{overlayText}
) : null}
- {canClick ? (
+ {darkOverlay || !noBorder ? (
+
+ ) : null}
+ {showVisualAttachment && isReadyToView(attachment) ? (
+ />
) : null}
{closeButton ? (
);
}
@@ -190,7 +234,9 @@ export function ImageGrid({
width={150}
cropWidth={GAP}
url={getThumbnailUrl(attachments[0])}
- onClick={onClick}
+ showVisualAttachment={showVisualAttachment}
+ cancelDownload={cancelDownload}
+ startDownload={downloadPill ? undefined : startDownload}
onError={onError}
/>
@@ -248,7 +300,9 @@ export function ImageGrid({
attachment={attachments[1]}
playIconOverlay={isVideoAttachment(attachments[1])}
url={getThumbnailUrl(attachments[1])}
- onClick={onClick}
+ showVisualAttachment={showVisualAttachment}
+ cancelDownload={cancelDownload}
+ startDownload={downloadPill ? undefined : startDownload}
onError={onError}
/>
+ {detailPill}
+ {downloadPill}
);
}
@@ -291,7 +349,9 @@ export function ImageGrid({
cropHeight={GAP}
cropWidth={GAP}
url={getThumbnailUrl(attachments[0])}
- onClick={onClick}
+ showVisualAttachment={showVisualAttachment}
+ cancelDownload={cancelDownload}
+ startDownload={downloadPill ? undefined : startDownload}
onError={onError}
/>