about summary refs log tree commit diff
path: root/app/assets/javascripts/components/reducers
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/components/reducers')
-rw-r--r--app/assets/javascripts/components/reducers/accounts.jsx4
-rw-r--r--app/assets/javascripts/components/reducers/user_lists.jsx3
2 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/components/reducers/accounts.jsx b/app/assets/javascripts/components/reducers/accounts.jsx
index f01144786..ba66f182a 100644
--- a/app/assets/javascripts/components/reducers/accounts.jsx
+++ b/app/assets/javascripts/components/reducers/accounts.jsx
@@ -12,7 +12,8 @@ import {
   REBLOG_SUCCESS,
   UNREBLOG_SUCCESS,
   FAVOURITE_SUCCESS,
-  UNFAVOURITE_SUCCESS
+  UNFAVOURITE_SUCCESS,
+  REBLOGS_FETCH_SUCCESS
 } from '../actions/interactions';
 import {
   TIMELINE_REFRESH_SUCCESS,
@@ -64,6 +65,7 @@ export default function accounts(state = initialState, action) {
     case SUGGESTIONS_FETCH_SUCCESS:
     case FOLLOWERS_FETCH_SUCCESS:
     case FOLLOWING_FETCH_SUCCESS:
+    case REBLOGS_FETCH_SUCCESS:
       return normalizeAccounts(state, action.accounts);
     case TIMELINE_REFRESH_SUCCESS:
     case TIMELINE_EXPAND_SUCCESS:
diff --git a/app/assets/javascripts/components/reducers/user_lists.jsx b/app/assets/javascripts/components/reducers/user_lists.jsx
index d3b073e95..686179af2 100644
--- a/app/assets/javascripts/components/reducers/user_lists.jsx
+++ b/app/assets/javascripts/components/reducers/user_lists.jsx
@@ -3,6 +3,7 @@ import {
   FOLLOWING_FETCH_SUCCESS
 } from '../actions/accounts';
 import { SUGGESTIONS_FETCH_SUCCESS } from '../actions/suggestions';
+import { REBLOGS_FETCH_SUCCESS } from '../actions/interactions';
 import Immutable from 'immutable';
 
 const initialState = Immutable.Map({
@@ -19,6 +20,8 @@ export default function userLists(state = initialState, action) {
       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)));
+    case REBLOGS_FETCH_SUCCESS:
+      return state.setIn(['reblogged_by', action.id], Immutable.List(action.accounts.map(item => item.id)));
     default:
       return state;
   }