From d32e0364f9aa2d61080c53489996351d4bd7b1c4 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Mon, 21 Nov 2016 10:52:11 +0100
Subject: Switch to compose route when replying and compose is not mounted

---
 app/assets/javascripts/components/features/status/index.jsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'app/assets/javascripts/components/features/status/index.jsx')

diff --git a/app/assets/javascripts/components/features/status/index.jsx b/app/assets/javascripts/components/features/status/index.jsx
index 553baf863..0a1528fe9 100644
--- a/app/assets/javascripts/components/features/status/index.jsx
+++ b/app/assets/javascripts/components/features/status/index.jsx
@@ -38,6 +38,9 @@ const makeMapStateToProps = () => {
 };
 
 const Status = React.createClass({
+  contextTypes: {
+    router: React.PropTypes.object
+  },
 
   propTypes: {
     params: React.PropTypes.object.isRequired,
@@ -64,7 +67,7 @@ const Status = React.createClass({
   },
 
   handleReplyClick (status) {
-    this.props.dispatch(replyCompose(status));
+    this.props.dispatch(replyCompose(status, this.context.router));
   },
 
   handleReblogClick (status) {
-- 
cgit 

