This commit is contained in:
mgabdev
2020-05-01 01:50:27 -04:00
parent c15d4f12dc
commit 8e349c368c
99 changed files with 1268 additions and 887 deletions

View File

@@ -39,8 +39,6 @@ const messages = defineMessages({
deleteMessage: { id: 'confirmations.delete.message', defaultMessage: 'Are you sure you want to delete this status?' },
replyConfirm: { id: 'confirmations.reply.confirm', defaultMessage: 'Reply' },
replyMessage: { id: 'confirmations.reply.message', defaultMessage: 'Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?' },
quoteConfirm: { id: 'confirmations.quote.confirm', defaultMessage: 'Quote' },
quoteMessage: { id: 'confirmations.quote.message', defaultMessage: 'Quoting now will overwrite the message you are currently composing. Are you sure you want to proceed?' },
blockAndReport: { id: 'confirmations.block.block_and_report', defaultMessage: 'Block & Report' },
});
@@ -114,33 +112,18 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
});
},
onRepost (targetRef, status, ) {
onRepost (targetRef, status, e) {
if (!me) return dispatch(openModal('UNAUTHORIZED'))
dispatch(openPopover('REPOST_OPTIONS', {
status,
targetRef,
position: 'top',
}))
// if (e.shiftKey || !boostModal) {
// this.onModalRepost(status);
// } else {
// dispatch(openModal('BOOST', { status, onRepost: this.onModalRepost }));
// }
// dispatch((_, getState) => {
// const state = getState();
// if (state.getIn(['compose', 'text']).trim().length !== 0) {
// dispatch(openModal('CONFIRM', {
// message: intl.formatMessage(messages.quoteMessage),
// confirm: intl.formatMessage(messages.quoteConfirm),
// onConfirm: () => dispatch(quoteCompose(status, router)),
// }));
// } else {
// dispatch(quoteCompose(status, router));
// }
// });
if (e.shiftKey) {
this.onModalRepost(status);
} else {
dispatch(openPopover('REPOST_OPTIONS', {
status,
targetRef,
position: 'top',
}))
}
},
onModalRepost (status) {
@@ -187,13 +170,6 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
}
},
onEmbed (status) {
// dispatch(openModal('EMBED', {
// url: status.get('url'),
// onError: error => dispatch(showAlertForError(error)),
// }));
},
onDelete (status, history) {
if (!me) return dispatch(openModal('UNAUTHORIZED'))