Removes showForwardMessageModal from conversation_view
This commit is contained in:
parent
5c059c54d5
commit
ec3c8d99ef
9 changed files with 10 additions and 21 deletions
|
@ -138,7 +138,7 @@ const defaultMessageProps: TimelineMessagesProps = {
|
||||||
showExpiredOutgoingTapToViewToast: action(
|
showExpiredOutgoingTapToViewToast: action(
|
||||||
'showExpiredOutgoingTapToViewToast'
|
'showExpiredOutgoingTapToViewToast'
|
||||||
),
|
),
|
||||||
showForwardMessageModal: action('default--showForwardMessageModal'),
|
toggleForwardMessageModal: action('default--toggleForwardMessageModal'),
|
||||||
showMessageDetail: action('default--showMessageDetail'),
|
showMessageDetail: action('default--showMessageDetail'),
|
||||||
showVisualAttachment: action('default--showVisualAttachment'),
|
showVisualAttachment: action('default--showVisualAttachment'),
|
||||||
startConversation: action('default--startConversation'),
|
startConversation: action('default--startConversation'),
|
||||||
|
|
|
@ -303,7 +303,7 @@ const actions = () => ({
|
||||||
showExpiredOutgoingTapToViewToast: action(
|
showExpiredOutgoingTapToViewToast: action(
|
||||||
'showExpiredOutgoingTapToViewToast'
|
'showExpiredOutgoingTapToViewToast'
|
||||||
),
|
),
|
||||||
showForwardMessageModal: action('showForwardMessageModal'),
|
toggleForwardMessageModal: action('toggleForwardMessageModal'),
|
||||||
|
|
||||||
showIdentity: action('showIdentity'),
|
showIdentity: action('showIdentity'),
|
||||||
|
|
||||||
|
|
|
@ -242,7 +242,7 @@ const getActions = createSelector(
|
||||||
'replyToMessage',
|
'replyToMessage',
|
||||||
'retryDeleteForEveryone',
|
'retryDeleteForEveryone',
|
||||||
'retrySend',
|
'retrySend',
|
||||||
'showForwardMessageModal',
|
'toggleForwardMessageModal',
|
||||||
'deleteMessage',
|
'deleteMessage',
|
||||||
'deleteMessageForEveryone',
|
'deleteMessageForEveryone',
|
||||||
'showMessageDetail',
|
'showMessageDetail',
|
||||||
|
|
|
@ -82,7 +82,7 @@ const getDefaultProps = () => ({
|
||||||
openGiftBadge: action('openGiftBadge'),
|
openGiftBadge: action('openGiftBadge'),
|
||||||
showContactDetail: action('showContactDetail'),
|
showContactDetail: action('showContactDetail'),
|
||||||
showContactModal: action('showContactModal'),
|
showContactModal: action('showContactModal'),
|
||||||
showForwardMessageModal: action('showForwardMessageModal'),
|
toggleForwardMessageModal: action('toggleForwardMessageModal'),
|
||||||
showVisualAttachment: action('showVisualAttachment'),
|
showVisualAttachment: action('showVisualAttachment'),
|
||||||
downloadAttachment: action('downloadAttachment'),
|
downloadAttachment: action('downloadAttachment'),
|
||||||
displayTapToViewMessage: action('displayTapToViewMessage'),
|
displayTapToViewMessage: action('displayTapToViewMessage'),
|
||||||
|
|
|
@ -316,7 +316,7 @@ const createProps = (overrideProps: Partial<Props> = {}): Props => ({
|
||||||
showExpiredOutgoingTapToViewToast: action(
|
showExpiredOutgoingTapToViewToast: action(
|
||||||
'showExpiredOutgoingTapToViewToast'
|
'showExpiredOutgoingTapToViewToast'
|
||||||
),
|
),
|
||||||
showForwardMessageModal: action('showForwardMessageModal'),
|
toggleForwardMessageModal: action('toggleForwardMessageModal'),
|
||||||
showMessageDetail: action('showMessageDetail'),
|
showMessageDetail: action('showMessageDetail'),
|
||||||
showVisualAttachment: action('showVisualAttachment'),
|
showVisualAttachment: action('showVisualAttachment'),
|
||||||
startConversation: action('startConversation'),
|
startConversation: action('startConversation'),
|
||||||
|
|
|
@ -42,7 +42,7 @@ export type PropsData = {
|
||||||
export type PropsActions = {
|
export type PropsActions = {
|
||||||
deleteMessage: (id: string) => void;
|
deleteMessage: (id: string) => void;
|
||||||
deleteMessageForEveryone: (id: string) => void;
|
deleteMessageForEveryone: (id: string) => void;
|
||||||
showForwardMessageModal: (id: string) => void;
|
toggleForwardMessageModal: (id: string) => void;
|
||||||
reactToMessage: (
|
reactToMessage: (
|
||||||
id: string,
|
id: string,
|
||||||
{ emoji, remove }: { emoji: string; remove: boolean }
|
{ emoji, remove }: { emoji: string; remove: boolean }
|
||||||
|
@ -100,7 +100,7 @@ export function TimelineMessage(props: Props): JSX.Element {
|
||||||
retrySend,
|
retrySend,
|
||||||
retryDeleteForEveryone,
|
retryDeleteForEveryone,
|
||||||
selectedReaction,
|
selectedReaction,
|
||||||
showForwardMessageModal,
|
toggleForwardMessageModal,
|
||||||
showMessageDetail,
|
showMessageDetail,
|
||||||
text,
|
text,
|
||||||
timestamp,
|
timestamp,
|
||||||
|
@ -335,7 +335,7 @@ export function TimelineMessage(props: Props): JSX.Element {
|
||||||
? () => retryDeleteForEveryone(id)
|
? () => retryDeleteForEveryone(id)
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
onForward={canForward ? () => showForwardMessageModal(id) : undefined}
|
onForward={canForward ? () => toggleForwardMessageModal(id) : undefined}
|
||||||
onDeleteForMe={() => deleteMessage(id)}
|
onDeleteForMe={() => deleteMessage(id)}
|
||||||
onDeleteForEveryone={
|
onDeleteForEveryone={
|
||||||
canDeleteForEveryone ? () => setHasDOEConfirmation(true) : undefined
|
canDeleteForEveryone ? () => setHasDOEConfirmation(true) : undefined
|
||||||
|
|
|
@ -75,9 +75,7 @@ export function SmartStories(): JSX.Element | null {
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
me={me}
|
me={me}
|
||||||
myStories={myStories}
|
myStories={myStories}
|
||||||
onForwardStory={storyId => {
|
onForwardStory={toggleForwardMessageModal}
|
||||||
toggleForwardMessageModal(storyId);
|
|
||||||
}}
|
|
||||||
onSaveStory={story => {
|
onSaveStory={story => {
|
||||||
if (story.attachment) {
|
if (story.attachment) {
|
||||||
saveAttachment(story.attachment, story.timestamp);
|
saveAttachment(story.attachment, story.timestamp);
|
||||||
|
|
|
@ -89,7 +89,6 @@ export type TimelinePropsType = ExternalProps &
|
||||||
| 'showContactModal'
|
| 'showContactModal'
|
||||||
| 'showExpiredIncomingTapToViewToast'
|
| 'showExpiredIncomingTapToViewToast'
|
||||||
| 'showExpiredOutgoingTapToViewToast'
|
| 'showExpiredOutgoingTapToViewToast'
|
||||||
| 'showForwardMessageModal'
|
|
||||||
| 'showIdentity'
|
| 'showIdentity'
|
||||||
| 'showMessageDetail'
|
| 'showMessageDetail'
|
||||||
| 'showVisualAttachment'
|
| 'showVisualAttachment'
|
||||||
|
|
|
@ -128,7 +128,6 @@ type MessageActionsType = {
|
||||||
showSafetyNumber: (contactId: string) => unknown;
|
showSafetyNumber: (contactId: string) => unknown;
|
||||||
showExpiredIncomingTapToViewToast: () => unknown;
|
showExpiredIncomingTapToViewToast: () => unknown;
|
||||||
showExpiredOutgoingTapToViewToast: () => unknown;
|
showExpiredOutgoingTapToViewToast: () => unknown;
|
||||||
showForwardMessageModal: (messageId: string) => unknown;
|
|
||||||
showIdentity: (conversationId: string) => unknown;
|
showIdentity: (conversationId: string) => unknown;
|
||||||
showMessageDetail: (messageId: string) => unknown;
|
showMessageDetail: (messageId: string) => unknown;
|
||||||
showVisualAttachment: (options: {
|
showVisualAttachment: (options: {
|
||||||
|
@ -559,8 +558,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
|
||||||
showToast(ToastTapToViewExpiredOutgoing);
|
showToast(ToastTapToViewExpiredOutgoing);
|
||||||
};
|
};
|
||||||
|
|
||||||
const showForwardMessageModal = this.showForwardMessageModal.bind(this);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
deleteMessage,
|
deleteMessage,
|
||||||
displayTapToViewMessage,
|
displayTapToViewMessage,
|
||||||
|
@ -580,7 +577,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
|
||||||
showSafetyNumber,
|
showSafetyNumber,
|
||||||
showExpiredIncomingTapToViewToast,
|
showExpiredIncomingTapToViewToast,
|
||||||
showExpiredOutgoingTapToViewToast,
|
showExpiredOutgoingTapToViewToast,
|
||||||
showForwardMessageModal,
|
|
||||||
showIdentity,
|
showIdentity,
|
||||||
showMessageDetail,
|
showMessageDetail,
|
||||||
showVisualAttachment,
|
showVisualAttachment,
|
||||||
|
@ -748,10 +744,6 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
|
||||||
this.model.updateVerified();
|
this.model.updateVerified();
|
||||||
}
|
}
|
||||||
|
|
||||||
async showForwardMessageModal(messageId: string): Promise<void> {
|
|
||||||
window.reduxActions.globalModals.toggleForwardMessageModal(messageId);
|
|
||||||
}
|
|
||||||
|
|
||||||
showAllMedia(): void {
|
showAllMedia(): void {
|
||||||
if (document.querySelectorAll('.module-media-gallery').length) {
|
if (document.querySelectorAll('.module-media-gallery').length) {
|
||||||
return;
|
return;
|
||||||
|
@ -1207,7 +1199,7 @@ export class ConversationView extends window.Backbone.View<ConversationModel> {
|
||||||
getConversation: getConversationSelector(window.reduxStore.getState()),
|
getConversation: getConversationSelector(window.reduxStore.getState()),
|
||||||
media,
|
media,
|
||||||
onForward: messageId => {
|
onForward: messageId => {
|
||||||
this.showForwardMessageModal(messageId);
|
window.reduxActions.globalModals.toggleForwardMessageModal(messageId);
|
||||||
},
|
},
|
||||||
onSave,
|
onSave,
|
||||||
selectedIndex: selectedIndex >= 0 ? selectedIndex : 0,
|
selectedIndex: selectedIndex >= 0 ? selectedIndex : 0,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue