diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-04-11 20:43:56 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-04-11 20:43:56 +0200 |
commit | 2a7602cad449da3590cb1eac2a86a3e5cc606966 (patch) | |
tree | e315f30c6cb4b40b670e9cbd15065851d5f44a33 /app/assets/javascripts/components/containers | |
parent | b723ee73fc7d74fd5908eb09a8f6b98e73597c2b (diff) | |
parent | 06444bf050a267da7001c2801480c5fae3e1559e (diff) |
Merge branch 'master' of https://github.com/blackle/mastodon into 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 })); + } } }, |