Allow edits which just remove the quote
This commit is contained in:
parent
96a2d05906
commit
855b1c03b0
8 changed files with 18 additions and 25 deletions
|
@ -193,13 +193,12 @@ export type OwnProps = Readonly<{
|
|||
|
||||
export type Props = Pick<
|
||||
CompositionInputProps,
|
||||
| 'clearQuotedMessage'
|
||||
| 'draftText'
|
||||
| 'draftBodyRanges'
|
||||
| 'getPreferredBadge'
|
||||
| 'getQuotedMessage'
|
||||
| 'onEditorStateChange'
|
||||
| 'onTextTooLong'
|
||||
| 'quotedMessageId'
|
||||
| 'sendCounter'
|
||||
| 'sortedGroupMembers'
|
||||
> &
|
||||
|
@ -275,11 +274,9 @@ export const CompositionArea = memo(function CompositionArea({
|
|||
setMediaQualitySetting,
|
||||
shouldSendHighQualityAttachments,
|
||||
// CompositionInput
|
||||
clearQuotedMessage,
|
||||
draftBodyRanges,
|
||||
draftText,
|
||||
getPreferredBadge,
|
||||
getQuotedMessage,
|
||||
isFormattingEnabled,
|
||||
onEditorStateChange,
|
||||
onTextTooLong,
|
||||
|
@ -720,10 +717,10 @@ export const CompositionArea = memo(function CompositionArea({
|
|||
const handleEscape = useCallback(() => {
|
||||
if (linkPreviewResult) {
|
||||
onCloseLinkPreview(conversationId);
|
||||
} else if (draftEditMessage) {
|
||||
discardEditMessage(conversationId);
|
||||
} else if (quotedMessageId) {
|
||||
setQuoteByMessageId(conversationId, undefined);
|
||||
} else if (draftEditMessage) {
|
||||
discardEditMessage(conversationId);
|
||||
}
|
||||
}, [
|
||||
conversationId,
|
||||
|
@ -1024,14 +1021,12 @@ export const CompositionArea = memo(function CompositionArea({
|
|||
)}
|
||||
>
|
||||
<CompositionInput
|
||||
clearQuotedMessage={clearQuotedMessage}
|
||||
conversationId={conversationId}
|
||||
disabled={isDisabled}
|
||||
draftBodyRanges={draftBodyRanges}
|
||||
draftEditMessage={draftEditMessage}
|
||||
draftText={draftText}
|
||||
getPreferredBadge={getPreferredBadge}
|
||||
getQuotedMessage={getQuotedMessage}
|
||||
i18n={i18n}
|
||||
inputApi={inputApiRef}
|
||||
isFormattingEnabled={isFormattingEnabled}
|
||||
|
@ -1048,6 +1043,7 @@ export const CompositionArea = memo(function CompositionArea({
|
|||
onSubmit={handleSubmit}
|
||||
onTextTooLong={onTextTooLong}
|
||||
platform={platform}
|
||||
quotedMessageId={quotedMessageId}
|
||||
sendCounter={sendCounter}
|
||||
shouldHidePopovers={shouldHidePopovers}
|
||||
skinTone={skinTone ?? null}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue