ConversationView: Move setQuotedMessage/scrollToMessage to redux

This commit is contained in:
Scott Nonnenberg 2022-12-09 11:11:14 -08:00 committed by GitHub
parent 7c68f9ef1a
commit 07f7fa93d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 183 additions and 159 deletions

View file

@ -49,8 +49,7 @@ export type PropsActions = {
) => void;
retrySend: (id: string) => void;
retryDeleteForEveryone: (id: string) => void;
replyToMessage: (id: string) => void;
setQuoteByMessageId: (conversationId: string, messageId: string) => void;
} & MessagePropsActions;
export type Props = PropsData &
@ -83,6 +82,7 @@ export function TimelineMessage(props: Props): JSX.Element {
canRetryDeleteForEveryone,
contact,
payment,
conversationId,
containerElementRef,
containerWidthBreakpoint,
deletedForEveryone,
@ -94,7 +94,7 @@ export function TimelineMessage(props: Props): JSX.Element {
isSticker,
isTapToView,
reactToMessage,
replyToMessage,
setQuoteByMessageId,
renderReactionPicker,
renderEmojiPicker,
retrySend,
@ -234,7 +234,9 @@ export function TimelineMessage(props: Props): JSX.Element {
? openGenericAttachment
: undefined;
const handleReplyToMessage = canReply ? () => replyToMessage(id) : undefined;
const handleReplyToMessage = canReply
? () => setQuoteByMessageId(conversationId, id)
: undefined;
const handleReact = canReact ? () => toggleReactionPicker() : undefined;