Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename multiple attachments #2917

Merged
merged 14 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ If you are using a Debian based Linux distribution gcc, g++ and make can be inst
apt install build-essential
```

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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const DocumentListItem = (props: Props) => {
messageTimestamp: props.mediaItem.messageTimestamp,
attachment: props.mediaItem.attachment,
conversationId: selectedConversationKey,
index: 0,
});
}, [
selectedConversationKey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export const MessageAttachment = (props: Props) => {
messageTimestamp,
messageSender: attachmentProps?.sender,
conversationId: attachmentProps?.convoId,
index: 0,
});
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ export const MessageContextMenu = (props: Props) => {
messageTimestamp,
messageSender: sender,
conversationId: convoId,
index: targetAttachmentIndex,
});
};

Expand Down
2 changes: 1 addition & 1 deletion ts/types/Attachment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export const save = ({
}: {
attachment: AttachmentType;
document: Document;
index?: number;
index: number;
getAbsolutePath: (relativePath: string) => string;
timestamp?: number;
}): void => {
Expand Down
3 changes: 3 additions & 0 deletions ts/util/attachmentsUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,18 +387,21 @@ export const saveAttachmentToDisk = async ({
messageTimestamp,
messageSender,
conversationId,
index,
}: {
attachment: AttachmentType;
messageTimestamp: number;
messageSender: string;
conversationId: string;
index: number;
RubenGarcia marked this conversation as resolved.
Show resolved Hide resolved
}) => {
const decryptedUrl = await getDecryptedMediaUrl(attachment.url, attachment.contentType, false);
save({
attachment: { ...attachment, url: decryptedUrl },
document,
getAbsolutePath: getAbsoluteAttachmentPath,
timestamp: messageTimestamp,
index,
});
await sendDataExtractionNotification(conversationId, messageSender, messageTimestamp);
};