From f21e7d6ac06556671c2663ce2879442c60230b32 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Mon, 30 Jan 2017 21:40:55 +0100
Subject: 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 />

---
 app/assets/javascripts/components/actions/compose.jsx | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

(limited to 'app/assets/javascripts/components/actions/compose.jsx')

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');
+    }
   };
 };
 
-- 
cgit 

