Make composer duck aware of the conversation it is in

This commit is contained in:
Josh Perez 2023-01-04 19:22:36 -05:00 committed by GitHub
parent 7a076be0e7
commit 198d6f7e26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 449 additions and 170 deletions

View file

@ -30,6 +30,7 @@ import {
getRecentStickers,
} from '../selectors/stickers';
import { isSignalConversation } from '../../util/isSignalConversation';
import { getComposerStateForConversationIdSelector } from '../selectors/composer';
type ExternalProps = {
id: string;
@ -67,6 +68,9 @@ const mapStateToProps = (state: StateType, props: ExternalProps) => {
receivedPacks.length > 0
);
const composerStateForConversationIdSelector =
getComposerStateForConversationIdSelector(state);
const {
attachments: draftAttachments,
focusCounter,
@ -76,7 +80,7 @@ const mapStateToProps = (state: StateType, props: ExternalProps) => {
messageCompositionId,
quotedMessage,
shouldSendHighQualityAttachments,
} = state.composer;
} = composerStateForConversationIdSelector(id);
const recentEmojis = selectRecentEmojis(state);