From f53fb6aa660834074bbbffac5b1fe5ea0cc85edf Mon Sep 17 00:00:00 2001 From: blackle Date: Tue, 11 Apr 2017 08:34:14 -0400 Subject: Bypass boost confirm modal if alt is pressed --- app/assets/javascripts/components/containers/status_container.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/assets/javascripts/components/containers/status_container.jsx') diff --git a/app/assets/javascripts/components/containers/status_container.jsx b/app/assets/javascripts/components/containers/status_container.jsx index 918fb91a0..02746cc79 100644 --- a/app/assets/javascripts/components/containers/status_container.jsx +++ b/app/assets/javascripts/components/containers/status_container.jsx @@ -42,11 +42,15 @@ const mapDispatchToProps = (dispatch) => ({ dispatch(reblog(status)); }, - onReblog (status) { + onReblog (status, e) { if (status.get('reblogged')) { dispatch(unreblog(status)); } else { - dispatch(openModal('BOOST', { status, onReblog: this.onModalReblog })); + if (e.altKey) { + this.onModalReblog(status); + } else { + dispatch(openModal('BOOST', { status, onReblog: this.onModalReblog })); + } } }, -- cgit