Merge pull request #2917 from RubenGarcia/RenameMultipleAttachments

Rename multiple attachments
This commit is contained in:
Audric Ackermann 2023-10-17 10:27:15 +11:00 committed by GitHub
commit 67f569e9e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 1 deletions

View File

@ -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)
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
Now, run these commands in your preferred terminal in a good directory for development:

View File

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

View File

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

View File

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

View File

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

View File

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