diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-04-11 21:30:34 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-04-11 21:30:34 +0200 |
commit | 5f74397ef032948ec3c648cec209fd2a279d4dd1 (patch) | |
tree | 5afd2cc867a07aaa511b3d476c46cfa1e7621faa /app/assets/javascripts/components/containers | |
parent | b723ee73fc7d74fd5908eb09a8f6b98e73597c2b (diff) | |
parent | 960181fd99cad30f860356a04d8237c19e9c82c8 (diff) |
Merge branch 'blackle-master'
Diffstat (limited to 'app/assets/javascripts/components/containers')
-rw-r--r-- | app/assets/javascripts/components/containers/status_container.jsx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/app/assets/javascripts/components/containers/status_container.jsx b/app/assets/javascripts/components/containers/status_container.jsx index fd3fbe4c3..f92c1cdf4 100644 --- a/app/assets/javascripts/components/containers/status_container.jsx +++ b/app/assets/javascripts/components/containers/status_container.jsx @@ -26,7 +26,8 @@ const makeMapStateToProps = () => { const mapStateToProps = (state, props) => ({ status: getStatus(state, props.id), - me: state.getIn(['meta', 'me']) + me: state.getIn(['meta', 'me']), + boostModal: state.getIn(['meta', 'boost_modal']) }); return mapStateToProps; @@ -38,11 +39,19 @@ const mapDispatchToProps = (dispatch) => ({ dispatch(replyCompose(status, router)); }, - onReblog (status) { + onModalReblog (status) { + dispatch(reblog(status)); + }, + + onReblog (status, e) { if (status.get('reblogged')) { dispatch(unreblog(status)); } else { - dispatch(reblog(status)); + if (e.altKey || !this.boostModal) { + this.onModalReblog(status); + } else { + dispatch(openModal('BOOST', { status, onReblog: this.onModalReblog })); + } } }, |