Eliminate resetEmojiResults, move onEditorStateChanged to redux

This commit is contained in:
Scott Nonnenberg 2022-12-08 15:56:17 -08:00 committed by GitHub
parent 6d868030ae
commit 5c059c54d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 162 additions and 155 deletions

View file

@ -56,6 +56,7 @@ export type DataPropsType = {
messageBody?: string;
onClose: () => void;
onEditorStateChange: (
conversationId: string | undefined,
messageText: string,
bodyRanges: DraftBodyRangesType,
caretLocation?: number
@ -332,7 +333,12 @@ export function ForwardMessageModal({
draftText={messageBodyText}
onChange={(messageText, bodyRanges, caretLocation?) => {
setMessageBodyText(messageText);
onEditorStateChange(messageText, bodyRanges, caretLocation);
onEditorStateChange(
undefined,
messageText,
bodyRanges,
caretLocation
);
}}
onSubmit={forwardMessage}
theme={theme}