From 98c3a5e9c38b3bc653002dafab0504fdee3d2c44 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Fri, 4 Nov 2016 12:48:53 +0100
Subject: Optimize how statuses are re-rendered and relative time intervals

---
 app/assets/javascripts/components/reducers/user_lists.jsx | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

(limited to 'app/assets/javascripts/components/reducers/user_lists.jsx')

diff --git a/app/assets/javascripts/components/reducers/user_lists.jsx b/app/assets/javascripts/components/reducers/user_lists.jsx
index 686179af2..4c201f927 100644
--- a/app/assets/javascripts/components/reducers/user_lists.jsx
+++ b/app/assets/javascripts/components/reducers/user_lists.jsx
@@ -3,13 +3,18 @@ import {
   FOLLOWING_FETCH_SUCCESS
 } from '../actions/accounts';
 import { SUGGESTIONS_FETCH_SUCCESS } from '../actions/suggestions';
-import { REBLOGS_FETCH_SUCCESS } from '../actions/interactions';
+import {
+  REBLOGS_FETCH_SUCCESS,
+  FAVOURITES_FETCH_SUCCESS
+} from '../actions/interactions';
 import Immutable from 'immutable';
 
 const initialState = Immutable.Map({
   followers: Immutable.Map(),
   following: Immutable.Map(),
-  suggestions: Immutable.List()
+  suggestions: Immutable.List(),
+  reblogged_by: Immutable.Map(),
+  favourited_by: Immutable.Map()
 });
 
 export default function userLists(state = initialState, action) {
@@ -22,6 +27,8 @@ export default function userLists(state = initialState, action) {
       return state.set('suggestions', Immutable.List(action.accounts.map(item => item.id)));
     case REBLOGS_FETCH_SUCCESS:
       return state.setIn(['reblogged_by', action.id], Immutable.List(action.accounts.map(item => item.id)));
+    case FAVOURITES_FETCH_SUCCESS:
+      return state.setIn(['favourited_by', action.id], Immutable.List(action.accounts.map(item => item.id)));
     default:
       return state;
   }
-- 
cgit 

