Don't pass full group to spoofing review dialog

This commit is contained in:
Fedor Indutny 2022-03-24 14:46:17 -07:00 committed by GitHub
parent ca3f8b7df0
commit d18ed40a23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 105 additions and 25 deletions

View file

@ -29,6 +29,8 @@ import {
} from '../selectors/conversations';
import { SmartTimelineItem } from './TimelineItem';
import { SmartContactSpoofingReviewDialog } from './ContactSpoofingReviewDialog';
import type { PropsType as SmartContactSpoofingReviewDialogPropsType } from './ContactSpoofingReviewDialog';
import { SmartTypingBubble } from './TypingBubble';
import { SmartHeroRow } from './HeroRow';
import { renderAudioAttachment } from './renderAudioAttachment';
@ -139,6 +141,12 @@ function renderItem({
);
}
function renderContactSpoofingReviewDialog(
props: SmartContactSpoofingReviewDialogPropsType
): JSX.Element {
return <SmartContactSpoofingReviewDialog {...props} />;
}
function renderHeroRow(
id: string,
unblurAvatar: () => void,
@ -286,7 +294,6 @@ const mapStateToProps = (state: StateType, props: ExternalProps) => {
return {
id,
...pick(conversation, ['unreadCount', 'isGroupV1AndDisabled']),
conversation,
isConversationSelected: state.conversations.selectedConversationId === id,
isIncomingMessageRequest: Boolean(
conversation.messageRequestsEnabled &&
@ -306,6 +313,7 @@ const mapStateToProps = (state: StateType, props: ExternalProps) => {
i18n: getIntl(state),
theme: getTheme(state),
renderItem,
renderContactSpoofingReviewDialog,
renderHeroRow,
renderTypingBubble,
...actions,