Removes showIdentity and showSafetyNumber in favor of redux action

This commit is contained in:
Josh Perez 2022-12-09 00:53:19 -05:00 committed by GitHub
parent 5043ac2e02
commit 135c832748
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 14 additions and 43 deletions

View file

@ -65,7 +65,6 @@ export type PropsData = {
receivedAt: number;
sentAt: number;
showSafetyNumber: (contactId: string) => void;
i18n: LocalizerType;
theme: ThemeType;
getPreferredBadge: PreferredBadgeSelectorType;
@ -101,7 +100,9 @@ export type PropsReduxActions = Pick<
| 'doubleCheckMissingQuoteReference'
| 'checkForAccount'
| 'viewStory'
>;
> & {
toggleSafetyNumberModal: (contactId: string) => void;
};
export type ExternalProps = PropsData & PropsBackboneActions;
export type Props = PropsData & PropsBackboneActions & PropsReduxActions;
@ -162,7 +163,7 @@ export class MessageDetail extends React.Component<Props> {
}
public renderContact(contact: Contact): JSX.Element {
const { i18n, showSafetyNumber } = this.props;
const { i18n, toggleSafetyNumberModal } = this.props;
const errors = contact.errors || [];
const errorComponent = contact.isOutgoingKeyError ? (
@ -170,7 +171,7 @@ export class MessageDetail extends React.Component<Props> {
<button
type="button"
className="module-message-detail__contact__show-safety-number"
onClick={() => showSafetyNumber(contact.id)}
onClick={() => toggleSafetyNumberModal(contact.id)}
>
{i18n('showSafetyNumber')}
</button>