From f8f40f15dafca65dc07d5c5c19fb9a9dc3473dd6 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Mon, 24 Oct 2016 17:11:02 +0200
Subject: Move status components inside individual containers. We still need to
 select all statuses/accounts to assemble, but at least lists don't have to be
 re-rendered all the time now. Also add "mention" dropdown option

---
 .../ui/containers/status_list_container.jsx        | 48 ++--------------------
 1 file changed, 4 insertions(+), 44 deletions(-)

(limited to 'app/assets/javascripts/components/features/ui/containers/status_list_container.jsx')

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 045cc59d1..213435a06 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
@@ -1,57 +1,17 @@
 import { connect }           from 'react-redux';
 import StatusList            from '../../../components/status_list';
-import { replyCompose }      from '../../../actions/compose';
-import {
-  reblog,
-  favourite,
-  unreblog,
-  unfavourite
-}                            from '../../../actions/interactions';
 import { expandTimeline }    from '../../../actions/timelines';
-import { makeGetTimeline }   from '../../../selectors';
-import { deleteStatus }      from '../../../actions/statuses';
 
-const makeMapStateToProps = () => {
-  const getTimeline = makeGetTimeline();
-
-  const mapStateToProps = (state, props) => ({
-    statuses: getTimeline(state, props.type),
-    me: state.getIn(['timelines', 'me'])
-  });
-
-  return mapStateToProps;
-};
+const mapStateToProps = (state, props) => ({
+  statusIds: state.getIn(['timelines', props.type])
+});
 
 const mapDispatchToProps = function (dispatch, props) {
   return {
-    onReply (status) {
-      dispatch(replyCompose(status));
-    },
-
-    onFavourite (status) {
-      if (status.get('favourited')) {
-        dispatch(unfavourite(status));
-      } else {
-        dispatch(favourite(status));
-      }
-    },
-
-    onReblog (status) {
-      if (status.get('reblogged')) {
-        dispatch(unreblog(status));
-      } else {
-        dispatch(reblog(status));
-      }
-    },
-
     onScrollToBottom () {
       dispatch(expandTimeline(props.type));
-    },
-
-    onDelete (status) {
-      dispatch(deleteStatus(status.get('id')));
     }
   };
 };
 
-export default connect(makeMapStateToProps, mapDispatchToProps)(StatusList);
+export default connect(mapStateToProps, mapDispatchToProps)(StatusList);
-- 
cgit 

