about summary refs log tree commit diff
path: root/app/assets/javascripts/components/features/status
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-09-18 18:18:46 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-09-18 18:18:46 +0200
commit0967961de758b375ca61df1ba9b448aaa2e3c1f8 (patch)
tree5935732cf384f05b35d30c16814b481d9012661b /app/assets/javascripts/components/features/status
parentdafcb021534d2a19ff5d4c1f9bedafb52a2ce77f (diff)
Improve how account detailed view looks, load account's statuses
Diffstat (limited to 'app/assets/javascripts/components/features/status')
-rw-r--r--app/assets/javascripts/components/features/status/index.jsx15
1 files changed, 2 insertions, 13 deletions
diff --git a/app/assets/javascripts/components/features/status/index.jsx b/app/assets/javascripts/components/features/status/index.jsx
index 03719d88e..72ff6a944 100644
--- a/app/assets/javascripts/components/features/status/index.jsx
+++ b/app/assets/javascripts/components/features/status/index.jsx
@@ -6,21 +6,10 @@ import Immutable                from 'immutable';
 import EmbeddedStatus           from '../../components/status';
 import { favourite, reblog }    from '../../actions/interactions';
 import { replyCompose }         from '../../actions/compose';
-
-function selectStatus(state, id) {
-  let status = state.getIn(['timelines', 'statuses', id]);
-
-  status = status.set('account', state.getIn(['timelines', 'accounts', status.get('account')]));
-
-  if (status.get('reblog') !== null) {
-    status = status.set('reblog', selectStatus(state, status.get('reblog')));
-  }
-
-  return status;
-};
+import { selectStatus }         from '../../reducers/timelines';
 
 function selectStatuses(state, ids) {
-  return ids.map(id => selectStatus(state, id));
+  return ids.map(id => selectStatus(state, id)).filterNot(status => status === null);
 };
 
 const mapStateToProps = (state, props) => ({