Bypass boost confirm modal if alt is pressed

This commit is contained in:
blackle committed 2017-04-11 08:34:14 -04:00
1 parent 01e5447e35
commit f53fb6aa66
5 files changed
+17 -9

No files matched your search

@@ -86,11 +86,15 @@ const Status = React.createClass({
this.props.dispatch(reblog(status));
},
handleReblogClick (status) {
handleReblogClick (status, e) {
if (status.get('reblogged')) {
this.props.dispatch(unreblog(status));
} else {
this.props.dispatch(openModal('BOOST', { status, onReblog: this.handleModalReblog }));
if (e.altKey) {
this.handleModalReblog(status);
} else {
this.props.dispatch(openModal('BOOST', { status, onReblog: this.handleModalReblog }));
}
}
},