Removes showContactModal in favor of redux action
This commit is contained in:
parent
135c832748
commit
81e4564687
4 changed files with 6 additions and 16 deletions
|
@ -87,7 +87,6 @@ export type PropsBackboneActions = Pick<
|
||||||
| 'openLink'
|
| 'openLink'
|
||||||
| 'renderAudioAttachment'
|
| 'renderAudioAttachment'
|
||||||
| 'showContactDetail'
|
| 'showContactDetail'
|
||||||
| 'showContactModal'
|
|
||||||
| 'showExpiredIncomingTapToViewToast'
|
| 'showExpiredIncomingTapToViewToast'
|
||||||
| 'showExpiredOutgoingTapToViewToast'
|
| 'showExpiredOutgoingTapToViewToast'
|
||||||
| 'showVisualAttachment'
|
| 'showVisualAttachment'
|
||||||
|
@ -99,6 +98,7 @@ export type PropsReduxActions = Pick<
|
||||||
| 'clearSelectedMessage'
|
| 'clearSelectedMessage'
|
||||||
| 'doubleCheckMissingQuoteReference'
|
| 'doubleCheckMissingQuoteReference'
|
||||||
| 'checkForAccount'
|
| 'checkForAccount'
|
||||||
|
| 'showContactModal'
|
||||||
| 'viewStory'
|
| 'viewStory'
|
||||||
> & {
|
> & {
|
||||||
toggleSafetyNumberModal: (contactId: string) => void;
|
toggleSafetyNumberModal: (contactId: string) => void;
|
||||||
|
|
|
@ -24,6 +24,7 @@ export type OwnProps = Omit<
|
||||||
| 'renderEmojiPicker'
|
| 'renderEmojiPicker'
|
||||||
| 'renderReactionPicker'
|
| 'renderReactionPicker'
|
||||||
| 'theme'
|
| 'theme'
|
||||||
|
| 'showContactModal'
|
||||||
| 'markViewed'
|
| 'markViewed'
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
@ -45,7 +46,6 @@ const mapStateToProps = (
|
||||||
openGiftBadge,
|
openGiftBadge,
|
||||||
openLink,
|
openLink,
|
||||||
showContactDetail,
|
showContactDetail,
|
||||||
showContactModal,
|
|
||||||
showExpiredIncomingTapToViewToast,
|
showExpiredIncomingTapToViewToast,
|
||||||
showExpiredOutgoingTapToViewToast,
|
showExpiredOutgoingTapToViewToast,
|
||||||
showVisualAttachment,
|
showVisualAttachment,
|
||||||
|
@ -84,7 +84,6 @@ const mapStateToProps = (
|
||||||
openLink,
|
openLink,
|
||||||
renderAudioAttachment,
|
renderAudioAttachment,
|
||||||
showContactDetail,
|
showContactDetail,
|
||||||
showContactModal,
|
|
||||||
showExpiredIncomingTapToViewToast,
|
showExpiredIncomingTapToViewToast,
|
||||||
showExpiredOutgoingTapToViewToast,
|
showExpiredOutgoingTapToViewToast,
|
||||||
showVisualAttachment,
|
showVisualAttachment,
|
||||||
|
|
|
@ -86,7 +86,6 @@ export type TimelinePropsType = ExternalProps &
|
||||||
| 'retrySend'
|
| 'retrySend'
|
||||||
| 'scrollToQuotedMessage'
|
| 'scrollToQuotedMessage'
|
||||||
| 'showContactDetail'
|
| 'showContactDetail'
|
||||||
| 'showContactModal'
|
|
||||||
| 'showExpiredIncomingTapToViewToast'
|
| 'showExpiredIncomingTapToViewToast'
|
||||||
| 'showExpiredOutgoingTapToViewToast'
|
| 'showExpiredOutgoingTapToViewToast'
|
||||||
| 'showMessageDetail'
|
| 'showMessageDetail'
|
||||||
|
|
|
@ -124,7 +124,6 @@ type MessageActionsType = {
|
||||||
uuid: UUIDStringType;
|
uuid: UUIDStringType;
|
||||||
};
|
};
|
||||||
}) => unknown;
|
}) => unknown;
|
||||||
showContactModal: (contactId: string) => unknown;
|
|
||||||
showExpiredIncomingTapToViewToast: () => unknown;
|
showExpiredIncomingTapToViewToast: () => unknown;
|
||||||
showExpiredOutgoingTapToViewToast: () => unknown;
|
showExpiredOutgoingTapToViewToast: () => unknown;
|
||||||
showMessageDetail: (messageId: string) => unknown;
|
showMessageDetail: (messageId: string) => unknown;
|
||||||
|
@ -182,7 +181,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
|
||||||
this.listenTo(this.model, 'open-all-media', this.showAllMedia);
|
this.listenTo(this.model, 'open-all-media', this.showAllMedia);
|
||||||
this.listenTo(this.model, 'escape-pressed', this.resetPanel);
|
this.listenTo(this.model, 'escape-pressed', this.resetPanel);
|
||||||
this.listenTo(this.model, 'show-message-details', this.showMessageDetail);
|
this.listenTo(this.model, 'show-message-details', this.showMessageDetail);
|
||||||
this.listenTo(this.model, 'show-contact-modal', this.showContactModal);
|
|
||||||
this.listenTo(
|
this.listenTo(
|
||||||
this.model,
|
this.model,
|
||||||
'toggle-reply',
|
'toggle-reply',
|
||||||
|
@ -474,9 +472,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
|
||||||
const showMessageDetail = (messageId: string) => {
|
const showMessageDetail = (messageId: string) => {
|
||||||
this.showMessageDetail(messageId);
|
this.showMessageDetail(messageId);
|
||||||
};
|
};
|
||||||
const showContactModal = (contactId: string) => {
|
|
||||||
this.showContactModal(contactId);
|
|
||||||
};
|
|
||||||
const openConversation = (conversationId: string, messageId?: string) => {
|
const openConversation = (conversationId: string, messageId?: string) => {
|
||||||
this.openConversation(conversationId, messageId);
|
this.openConversation(conversationId, messageId);
|
||||||
};
|
};
|
||||||
|
@ -565,7 +560,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
|
||||||
retrySend,
|
retrySend,
|
||||||
retryDeleteForEveryone,
|
retryDeleteForEveryone,
|
||||||
showContactDetail,
|
showContactDetail,
|
||||||
showContactModal,
|
|
||||||
showExpiredIncomingTapToViewToast,
|
showExpiredIncomingTapToViewToast,
|
||||||
showExpiredOutgoingTapToViewToast,
|
showExpiredOutgoingTapToViewToast,
|
||||||
showMessageDetail,
|
showMessageDetail,
|
||||||
|
@ -952,7 +946,10 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
|
||||||
maxShownMemberCount={32}
|
maxShownMemberCount={32}
|
||||||
memberships={memberships}
|
memberships={memberships}
|
||||||
showContactModal={contactId => {
|
showContactModal={contactId => {
|
||||||
this.showContactModal(contactId);
|
window.reduxActions.globalModals.showContactModal(
|
||||||
|
contactId,
|
||||||
|
this.model.id
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
theme={theme}
|
theme={theme}
|
||||||
/>
|
/>
|
||||||
|
@ -1264,10 +1261,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
|
||||||
this.showLightboxForMedia(selectedMedia, media);
|
this.showLightboxForMedia(selectedMedia, media);
|
||||||
}
|
}
|
||||||
|
|
||||||
showContactModal(contactId: string): void {
|
|
||||||
window.reduxActions.globalModals.showContactModal(contactId, this.model.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
showGroupLinkManagement(): void {
|
showGroupLinkManagement(): void {
|
||||||
const view = new ReactWrapperView({
|
const view = new ReactWrapperView({
|
||||||
className: 'panel',
|
className: 'panel',
|
||||||
|
@ -1367,7 +1360,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
|
||||||
addMembers: this.model.addMembersV2.bind(this.model),
|
addMembers: this.model.addMembersV2.bind(this.model),
|
||||||
conversationId: this.model.get('id'),
|
conversationId: this.model.get('id'),
|
||||||
showAllMedia: this.showAllMedia.bind(this),
|
showAllMedia: this.showAllMedia.bind(this),
|
||||||
showContactModal: this.showContactModal.bind(this),
|
|
||||||
showChatColorEditor: this.showChatColorEditor.bind(this),
|
showChatColorEditor: this.showChatColorEditor.bind(this),
|
||||||
showGroupLinkManagement: this.showGroupLinkManagement.bind(this),
|
showGroupLinkManagement: this.showGroupLinkManagement.bind(this),
|
||||||
showGroupV2Permissions: this.showGroupV2Permissions.bind(this),
|
showGroupV2Permissions: this.showGroupV2Permissions.bind(this),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue