Merge pull request #2917 from RubenGarcia/RenameMultipleAttachments

Rename multiple attachments
pull/2994/head
Audric Ackermann 2 years ago committed by GitHub
commit 67f569e9e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -41,6 +41,12 @@ Building on Windows is a pain, but is possible see our CI/Windows build machine
1. Install build tools `apt install build-essential cmake` (this installs make, g++, gcc) 1. Install build tools `apt install build-essential cmake` (this installs make, g++, gcc)
2. Depending on your distro, you might need to install `hunspell` and `hunspell-<lan>` (e.g. `hunspell-en-au`) 2. Depending on your distro, you might need to install `hunspell` and `hunspell-<lan>` (e.g. `hunspell-en-au`)
In Ubuntu, you may also need to install
```
sudo apt install cmake
npm install cmake-js
```
### All platforms ### All platforms
Now, run these commands in your preferred terminal in a good directory for development: Now, run these commands in your preferred terminal in a good directory for development:

@ -35,6 +35,7 @@ export const DocumentListItem = (props: Props) => {
messageTimestamp: props.mediaItem.messageTimestamp, messageTimestamp: props.mediaItem.messageTimestamp,
attachment: props.mediaItem.attachment, attachment: props.mediaItem.attachment,
conversationId: selectedConversationKey, conversationId: selectedConversationKey,
index: 0,
}); });
}, [ }, [
selectedConversationKey, selectedConversationKey,

@ -98,6 +98,7 @@ export const MessageAttachment = (props: Props) => {
messageTimestamp, messageTimestamp,
messageSender: attachmentProps?.sender, messageSender: attachmentProps?.sender,
conversationId: attachmentProps?.convoId, conversationId: attachmentProps?.convoId,
index: 0,
}); });
} }
}, },

@ -299,6 +299,7 @@ export const MessageContextMenu = (props: Props) => {
messageTimestamp, messageTimestamp,
messageSender: sender, messageSender: sender,
conversationId: convoId, conversationId: convoId,
index: targetAttachmentIndex,
}); });
}; };

@ -301,7 +301,7 @@ export const save = ({
}: { }: {
attachment: AttachmentType; attachment: AttachmentType;
document: Document; document: Document;
index?: number; index: number;
getAbsolutePath: (relativePath: string) => string; getAbsolutePath: (relativePath: string) => string;
timestamp?: number; timestamp?: number;
}): void => { }): void => {

@ -387,11 +387,13 @@ export const saveAttachmentToDisk = async ({
messageTimestamp, messageTimestamp,
messageSender, messageSender,
conversationId, conversationId,
index,
}: { }: {
attachment: AttachmentType; attachment: AttachmentType;
messageTimestamp: number; messageTimestamp: number;
messageSender: string; messageSender: string;
conversationId: string; conversationId: string;
index: number;
}) => { }) => {
const decryptedUrl = await getDecryptedMediaUrl(attachment.url, attachment.contentType, false); const decryptedUrl = await getDecryptedMediaUrl(attachment.url, attachment.contentType, false);
save({ save({
@ -399,6 +401,7 @@ export const saveAttachmentToDisk = async ({
document, document,
getAbsolutePath: getAbsoluteAttachmentPath, getAbsolutePath: getAbsoluteAttachmentPath,
timestamp: messageTimestamp, timestamp: messageTimestamp,
index,
}); });
await sendDataExtractionNotification(conversationId, messageSender, messageTimestamp); await sendDataExtractionNotification(conversationId, messageSender, messageTimestamp);
}; };

Loading…
Cancel
Save