[Glitch] Show compose form on delete & redraft when in mobile layout

Port 025fbb8285 to glitch-soc
This commit is contained in:
Thibaut Girka
2018-08-31 16:41:58 +02:00
committed by ThibG
parent 0f1db47a7e
commit 130bdb5ee8
5 changed files with 15 additions and 11 deletions

View File

@ -122,14 +122,14 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
dispatch(openModal('EMBED', { url: status.get('url') }));
},
onDelete (status, withRedraft = false) {
onDelete (status, history, withRedraft = false) {
if (!deleteModal) {
dispatch(deleteStatus(status.get('id'), withRedraft));
dispatch(deleteStatus(status.get('id'), history, withRedraft));
} else {
dispatch(openModal('CONFIRM', {
message: intl.formatMessage(withRedraft ? messages.redraftMessage : messages.deleteMessage),
confirm: intl.formatMessage(withRedraft ? messages.redraftConfirm : messages.deleteConfirm),
onConfirm: () => dispatch(deleteStatus(status.get('id'), withRedraft)),
onConfirm: () => dispatch(deleteStatus(status.get('id'), history, withRedraft)),
}));
}
},