about summary refs log tree commit diff
path: root/app/assets/javascripts/components/containers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-08-31 22:58:10 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-08-31 22:58:10 +0200
commitdbae8062f4ff6dcad98c90f6654b27111806013a (patch)
tree68b423ac1d0c52b601dfac6838e26ce049323f57 /app/assets/javascripts/components/containers
parent1e0e17ba85deebd6763ed9414f3cc2e2a23e1dbd (diff)
Replies in the compose form
Diffstat (limited to 'app/assets/javascripts/components/containers')
-rw-r--r--app/assets/javascripts/components/containers/composer_drawer_container.jsx13
-rw-r--r--app/assets/javascripts/components/containers/status_list_container.jsx15
2 files changed, 21 insertions, 7 deletions
diff --git a/app/assets/javascripts/components/containers/composer_drawer_container.jsx b/app/assets/javascripts/components/containers/composer_drawer_container.jsx
index 2a7344509..e9cef99b2 100644
--- a/app/assets/javascripts/components/containers/composer_drawer_container.jsx
+++ b/app/assets/javascripts/components/containers/composer_drawer_container.jsx
@@ -1,11 +1,12 @@
-import { connect }                      from 'react-redux';
-import ComposerDrawer                   from '../components/composer_drawer';
-import { changeCompose, submitCompose } from '../actions/compose';
+import { connect }                                          from 'react-redux';
+import ComposerDrawer                                       from '../components/composer_drawer';
+import { changeCompose, submitCompose, cancelReplyCompose } from '../actions/compose';
 
 const mapStateToProps = function (state, props) {
   return {
     text: state.getIn(['compose', 'text']),
-    isSubmitting: state.getIn(['compose', 'isSubmitting'])
+    is_submitting: state.getIn(['compose', 'is_submitting']),
+    in_reply_to: state.getIn(['compose', 'in_reply_to'])
   };
 };
 
@@ -17,6 +18,10 @@ const mapDispatchToProps = function (dispatch) {
 
     onSubmit: function () {
       dispatch(submitCompose());
+    },
+
+    onCancelReply: function () {
+      dispatch(cancelReplyCompose());
     }
   }
 };
diff --git a/app/assets/javascripts/components/containers/status_list_container.jsx b/app/assets/javascripts/components/containers/status_list_container.jsx
index bbf8a8876..9cdd7f4c2 100644
--- a/app/assets/javascripts/components/containers/status_list_container.jsx
+++ b/app/assets/javascripts/components/containers/status_list_container.jsx
@@ -1,5 +1,6 @@
-import { connect } from 'react-redux';
-import StatusList  from '../components/status_list';
+import { connect }      from 'react-redux';
+import StatusList       from '../components/status_list';
+import { replyCompose } from '../actions/compose';
 
 const mapStateToProps = function (state, props) {
   return {
@@ -7,4 +8,12 @@ const mapStateToProps = function (state, props) {
   };
 };
 
-export default connect(mapStateToProps)(StatusList);
+const mapDispatchToProps = function (dispatch) {
+  return {
+    onReply: function (status) {
+      dispatch(replyCompose(status));
+    }
+  };
+};
+
+export default connect(mapStateToProps, mapDispatchToProps)(StatusList);