diff options
Diffstat (limited to 'app/javascript/mastodon/reducers/accounts_counters.js')
-rw-r--r-- | app/javascript/mastodon/reducers/accounts_counters.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/javascript/mastodon/reducers/accounts_counters.js b/app/javascript/mastodon/reducers/accounts_counters.js index 2afc6c3d9..f0433c48c 100644 --- a/app/javascript/mastodon/reducers/accounts_counters.js +++ b/app/javascript/mastodon/reducers/accounts_counters.js @@ -87,7 +87,11 @@ const initialState = Immutable.Map(); export default function accountsCounters(state = initialState, action) { switch(action.type) { case STORE_HYDRATE: - return state.merge(action.state.get('accounts_counters')); + return state.merge(action.state.get('accounts').map(item => Immutable.fromJS({ + followers_count: item.get('followers_count'), + following_count: item.get('following_count'), + statuses_count: item.get('statuses_count') + }))); case ACCOUNT_FETCH_SUCCESS: case NOTIFICATIONS_UPDATE: return normalizeAccount(state, action.account); |