Bypass boost confirm modal if alt is pressed
This commit is contained in:
1 parent
01e5447e35
commit
f53fb6aa66
5 files changed
+17
-9
No files matched your search
@@ -37,8 +37,8 @@ const ActionBar = React.createClass({
|
||||
this.props.onReply(this.props.status);
|
||||
},
|
||||
|
||||
handleReblogClick () {
|
||||
this.props.onReblog(this.props.status);
|
||||
handleReblogClick (e) {
|
||||
this.props.onReblog(this.props.status, e);
|
||||
},
|
||||
|
||||
handleFavouriteClick () {
|
||||
|
||||
@@ -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 }));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user