Attachment Modal: Remove compression update on paste (#6444)
This commit is contained in:
parent
a652cf97ae
commit
5fa084c78d
@ -994,6 +994,7 @@ const Composer: FC<OwnProps & StateProps> = ({
|
||||
editingMessage,
|
||||
!isCurrentUserPremium && !isChatWithSelf,
|
||||
showCustomEmojiPremiumNotification,
|
||||
!attachments.length,
|
||||
);
|
||||
|
||||
const handleEmbeddedClear = useLastCallback(() => {
|
||||
|
||||
@ -31,6 +31,7 @@ const useClipboardPaste = (
|
||||
editedMessage: ApiMessage | undefined,
|
||||
shouldStripCustomEmoji?: boolean,
|
||||
onCustomEmojiStripped?: VoidFunction,
|
||||
shouldUpdateAttachmentCompression?: boolean,
|
||||
) => {
|
||||
const {
|
||||
showNotification,
|
||||
@ -130,8 +131,10 @@ const useClipboardPaste = (
|
||||
}
|
||||
|
||||
if (shouldSetAttachments) {
|
||||
updateShouldSaveAttachmentsCompression({ shouldSave: true });
|
||||
applyDefaultAttachmentsCompression();
|
||||
if (shouldUpdateAttachmentCompression) {
|
||||
updateShouldSaveAttachmentsCompression({ shouldSave: true });
|
||||
applyDefaultAttachmentsCompression();
|
||||
}
|
||||
setAttachments(editedMessage ? newAttachments : (attachments) => attachments.concat(newAttachments));
|
||||
}
|
||||
|
||||
@ -151,7 +154,7 @@ const useClipboardPaste = (
|
||||
};
|
||||
}, [
|
||||
insertTextAndUpdateCursor, editedMessage, setAttachments, isActive, shouldStripCustomEmoji,
|
||||
onCustomEmojiStripped, setNextText, lang,
|
||||
onCustomEmojiStripped, setNextText, lang, shouldUpdateAttachmentCompression,
|
||||
]);
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user