about summary refs log tree commit diff
path: root/app/assets/javascripts/components/features/ui
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-09-30 00:00:45 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-09-30 00:00:45 +0200
commitef2b50c9acf8bdc2119bfe3d8fe127d92f32c0a7 (patch)
tree932297efa748fcc0578303a12829246ddf0f3836 /app/assets/javascripts/components/features/ui
parenta41c3487bd0564d0a27be5e3937aaf898e34f6f3 (diff)
Deleting statuses from UI
Diffstat (limited to 'app/assets/javascripts/components/features/ui')
-rw-r--r--app/assets/javascripts/components/features/ui/containers/status_list_container.jsx16
1 files changed, 11 insertions, 5 deletions
diff --git a/app/assets/javascripts/components/features/ui/containers/status_list_container.jsx b/app/assets/javascripts/components/features/ui/containers/status_list_container.jsx
index 4757ba448..7a8407b09 100644
--- a/app/assets/javascripts/components/features/ui/containers/status_list_container.jsx
+++ b/app/assets/javascripts/components/features/ui/containers/status_list_container.jsx
@@ -4,29 +4,35 @@ import { replyCompose }      from '../../../actions/compose';
 import { reblog, favourite } from '../../../actions/interactions';
 import { expandTimeline }    from '../../../actions/timelines';
 import { selectStatus }      from '../../../reducers/timelines';
+import { deleteStatus }      from '../../../actions/statuses';
 
 const mapStateToProps = function (state, props) {
   return {
-    statuses: state.getIn(['timelines', props.type]).map(id => selectStatus(state, id))
+    statuses: state.getIn(['timelines', props.type]).map(id => selectStatus(state, id)),
+    me: state.getIn(['timelines', 'me'])
   };
 };
 
 const mapDispatchToProps = function (dispatch, props) {
   return {
-    onReply: function (status) {
+    onReply (status) {
       dispatch(replyCompose(status));
     },
 
-    onFavourite: function (status) {
+    onFavourite (status) {
       dispatch(favourite(status));
     },
 
-    onReblog: function (status) {
+    onReblog (status) {
       dispatch(reblog(status));
     },
 
-    onScrollToBottom: function () {
+    onScrollToBottom () {
       dispatch(expandTimeline(props.type));
+    },
+
+    onDelete (status) {
+      dispatch(deleteStatus(status.get('id')));
     }
   };
 };