diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-01-30 21:40:55 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-01-30 21:44:11 +0100 |
commit | f21e7d6ac06556671c2663ce2879442c60230b32 (patch) | |
tree | 68260b8383038daf6f315093064a2dbdd7b3944b /app/assets/javascripts/components/actions/compose.jsx | |
parent | a2a85e85491110461cbc938abd0f2687f0e51612 (diff) |
Make profile header scroll along with contents. AccountTimeline, Followers and Following are no longer
nested inside a common parent (<Account>), instead they all embed <HeaderContainer />
Diffstat (limited to 'app/assets/javascripts/components/actions/compose.jsx')
-rw-r--r-- | app/assets/javascripts/components/actions/compose.jsx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/app/assets/javascripts/components/actions/compose.jsx b/app/assets/javascripts/components/actions/compose.jsx index 6d0188166..e11d1e537 100644 --- a/app/assets/javascripts/components/actions/compose.jsx +++ b/app/assets/javascripts/components/actions/compose.jsx @@ -54,10 +54,16 @@ export function cancelReplyCompose() { }; }; -export function mentionCompose(account) { - return { - type: COMPOSE_MENTION, - account: account +export function mentionCompose(account, router) { + return (dispatch, getState) => { + dispatch({ + type: COMPOSE_MENTION, + account: account + }); + + if (!getState().getIn(['compose', 'mounted'])) { + router.push('/statuses/new'); + } }; }; |