From e76eee532950415c778ab932fd0599ee5f505cb8 Mon Sep 17 00:00:00 2001 From: William Grant Date: Tue, 23 Jan 2024 16:54:40 +1100 Subject: [PATCH] fix: make sure to save the attachment that is visible in the carousel --- .../right-panel/overlay/message-info/OverlayMessageInfo.tsx | 5 ++--- ts/util/saveURLAsFile.ts | 3 --- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ts/components/conversation/right-panel/overlay/message-info/OverlayMessageInfo.tsx b/ts/components/conversation/right-panel/overlay/message-info/OverlayMessageInfo.tsx index 3668f650c..5d2cbc19e 100644 --- a/ts/components/conversation/right-panel/overlay/message-info/OverlayMessageInfo.tsx +++ b/ts/components/conversation/right-panel/overlay/message-info/OverlayMessageInfo.tsx @@ -223,9 +223,8 @@ export const OverlayMessageInfo = () => { conversationId: convoId, messageSender: sender, messageTimestamp: serverTimestamp || timestamp || Date.now(), - attachment: attachments[0], - // TODO what about multiple attachments? - index: 0, + attachment: attachments[visibleAttachmentIndex], + index: visibleAttachmentIndex, }); } }} diff --git a/ts/util/saveURLAsFile.ts b/ts/util/saveURLAsFile.ts index 90bc99273..abd20eceb 100644 --- a/ts/util/saveURLAsFile.ts +++ b/ts/util/saveURLAsFile.ts @@ -1,6 +1,3 @@ -/** - * @prettier - */ export const saveURLAsFile = ({ filename, url,