about summary refs log tree commit diff
path: root/app/assets/javascripts/components/reducers/user_lists.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/components/reducers/user_lists.jsx')
-rw-r--r--app/assets/javascripts/components/reducers/user_lists.jsx10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/assets/javascripts/components/reducers/user_lists.jsx b/app/assets/javascripts/components/reducers/user_lists.jsx
index ee4b84296..d3b073e95 100644
--- a/app/assets/javascripts/components/reducers/user_lists.jsx
+++ b/app/assets/javascripts/components/reducers/user_lists.jsx
@@ -1,12 +1,14 @@
 import {
   FOLLOWERS_FETCH_SUCCESS,
   FOLLOWING_FETCH_SUCCESS
-}                          from '../actions/accounts';
-import Immutable           from 'immutable';
+} from '../actions/accounts';
+import { SUGGESTIONS_FETCH_SUCCESS } from '../actions/suggestions';
+import Immutable from 'immutable';
 
 const initialState = Immutable.Map({
   followers: Immutable.Map(),
-  following: Immutable.Map()
+  following: Immutable.Map(),
+  suggestions: Immutable.List()
 });
 
 export default function userLists(state = initialState, action) {
@@ -15,6 +17,8 @@ export default function userLists(state = initialState, action) {
       return state.setIn(['followers', action.id], Immutable.List(action.accounts.map(item => item.id)));
     case FOLLOWING_FETCH_SUCCESS:
       return state.setIn(['following', action.id], Immutable.List(action.accounts.map(item => item.id)));
+    case SUGGESTIONS_FETCH_SUCCESS:
+      return state.set('suggestions', Immutable.List(action.accounts.map(item => item.id)));
     default:
       return state;
   }