about summary refs log tree commit diff
path: root/app/assets/javascripts/components/reducers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-10-08 00:01:22 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-10-08 00:01:22 +0200
commitef9d4f4e0615bcc42528e2e73ade0ba02baa3ed9 (patch)
treef3e90eab6ebae1ba4b1061362e91f98dda2dc5bc /app/assets/javascripts/components/reducers
parent1f650d327d35bc48b897da99914c43750d8e5fd3 (diff)
Use reselect to memoize denormalization in UI state
Also upgrade react-redux to latest version. This is a performance update
Diffstat (limited to 'app/assets/javascripts/components/reducers')
-rw-r--r--app/assets/javascripts/components/reducers/timelines.jsx26
1 files changed, 0 insertions, 26 deletions
diff --git a/app/assets/javascripts/components/reducers/timelines.jsx b/app/assets/javascripts/components/reducers/timelines.jsx
index 0b02ac181..927ac28fd 100644
--- a/app/assets/javascripts/components/reducers/timelines.jsx
+++ b/app/assets/javascripts/components/reducers/timelines.jsx
@@ -40,32 +40,6 @@ const initialState = Immutable.Map({
   relationships: Immutable.Map()
 });
 
-export function selectStatus(state, id) {
-  let status = state.getIn(['timelines', 'statuses', id], null);
-
-  if (status === null) {
-    return null;
-  }
-
-  status = status.set('account', selectAccount(state, status.get('account')));
-
-  if (status.get('reblog') !== null) {
-    status = status.set('reblog', selectStatus(state, status.get('reblog')));
-  }
-
-  return status;
-};
-
-export function selectAccount(state, id) {
-  let account = state.getIn(['timelines', 'accounts', id], null);
-
-  if (account === null) {
-    return null;
-  }
-
-  return account.set('relationship', state.getIn(['timelines', 'relationships', id]));
-};
-
 function normalizeStatus(state, status) {
   // Separate account
   let account = status.get('account');