Remove routerHistory parameters from composer actions (#31077)

This commit is contained in:
Claire 2024-07-19 17:26:44 +02:00 committed by GitHub
parent adadfdbc03
commit e768b23aa9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 91 additions and 100 deletions

View file

@ -280,11 +280,11 @@ class Status extends ImmutablePureComponent {
modalProps: {
message: intl.formatMessage(messages.replyMessage),
confirm: intl.formatMessage(messages.replyConfirm),
onConfirm: () => dispatch(replyCompose(status, this.props.history)),
onConfirm: () => dispatch(replyCompose(status)),
},
}));
} else {
dispatch(replyCompose(status, this.props.history));
dispatch(replyCompose(status));
}
} else {
dispatch(openModal({
@ -336,33 +336,33 @@ class Status extends ImmutablePureComponent {
}
};
handleDeleteClick = (status, history, withRedraft = false) => {
handleDeleteClick = (status, withRedraft = false) => {
const { dispatch, intl } = this.props;
if (!deleteModal) {
dispatch(deleteStatus(status.get('id'), history, withRedraft));
dispatch(deleteStatus(status.get('id'), withRedraft));
} else {
dispatch(openModal({
modalType: 'CONFIRM',
modalProps: {
message: intl.formatMessage(withRedraft ? messages.redraftMessage : messages.deleteMessage),
confirm: intl.formatMessage(withRedraft ? messages.redraftConfirm : messages.deleteConfirm),
onConfirm: () => dispatch(deleteStatus(status.get('id'), history, withRedraft)),
onConfirm: () => dispatch(deleteStatus(status.get('id'), withRedraft)),
},
}));
}
};
handleEditClick = (status, history) => {
this.props.dispatch(editStatus(status.get('id'), history));
handleEditClick = (status) => {
this.props.dispatch(editStatus(status.get('id')));
};
handleDirectClick = (account, router) => {
this.props.dispatch(directCompose(account, router));
handleDirectClick = (account) => {
this.props.dispatch(directCompose(account));
};
handleMentionClick = (account, router) => {
this.props.dispatch(mentionCompose(account, router));
handleMentionClick = (account) => {
this.props.dispatch(mentionCompose(account));
};
handleOpenMedia = (media, index, lang) => {