|
|
@ -174,16 +174,16 @@ export default class Status extends ImmutablePureComponent {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
handleDeleteClick = (status, withRedraft = false) => {
|
|
|
|
handleDeleteClick = (status, history, withRedraft = false) => {
|
|
|
|
const { dispatch, intl } = this.props;
|
|
|
|
const { dispatch, intl } = this.props;
|
|
|
|
|
|
|
|
|
|
|
|
if (!deleteModal) {
|
|
|
|
if (!deleteModal) {
|
|
|
|
dispatch(deleteStatus(status.get('id'), withRedraft));
|
|
|
|
dispatch(deleteStatus(status.get('id'), history, withRedraft));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
dispatch(openModal('CONFIRM', {
|
|
|
|
dispatch(openModal('CONFIRM', {
|
|
|
|
message: intl.formatMessage(withRedraft ? messages.redraftMessage : messages.deleteMessage),
|
|
|
|
message: intl.formatMessage(withRedraft ? messages.redraftMessage : messages.deleteMessage),
|
|
|
|
confirm: intl.formatMessage(withRedraft ? messages.redraftConfirm : messages.deleteConfirm),
|
|
|
|
confirm: intl.formatMessage(withRedraft ? messages.redraftConfirm : messages.deleteConfirm),
|
|
|
|
onConfirm: () => dispatch(deleteStatus(status.get('id'), withRedraft)),
|
|
|
|
onConfirm: () => dispatch(deleteStatus(status.get('id'), history, withRedraft)),
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|