Remove quote when editing a message

This commit is contained in:
Josh Perez 2023-06-13 09:46:06 -07:00 committed by GitHub
parent abdad8f491
commit 975f43102e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

View file

@ -893,9 +893,13 @@ export function CompositionArea({
? () => scrollToMessage(conversationId, quotedMessageId)
: undefined
}
onClose={() => {
setQuoteByMessageId(conversationId, undefined);
}}
onClose={
draftEditMessage
? undefined
: () => {
setQuoteByMessageId(conversationId, undefined);
}
}
/>
</div>
)}

View file

@ -1754,6 +1754,12 @@ function setMessageToEdit(
return;
}
setQuoteByMessageId(conversationId, undefined)(
dispatch,
getState,
undefined
);
let attachmentThumbnail: string | undefined;
if (message.attachments) {
const thumbnailPath = message.attachments[0]?.thumbnail?.path;