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-09-17 17:03:36 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-09-17 17:03:36 +0200
commit0e9c1a297aa15570d87da356f2ac908f1fd433a3 (patch)
tree1c8ab8e3115f6890229fe34a41e5c827d7dd1679 /app/assets/javascripts/components/reducers
parent8c0b19012bae203f41b75cf40d6baf121f67fdea (diff)
Improved error handling for FollowRemoteService
Diffstat (limited to 'app/assets/javascripts/components/reducers')
-rw-r--r--app/assets/javascripts/components/reducers/timelines.jsx14
1 files changed, 9 insertions, 5 deletions
diff --git a/app/assets/javascripts/components/reducers/timelines.jsx b/app/assets/javascripts/components/reducers/timelines.jsx
index 79d7d1f7d..462c10733 100644
--- a/app/assets/javascripts/components/reducers/timelines.jsx
+++ b/app/assets/javascripts/components/reducers/timelines.jsx
@@ -1,8 +1,9 @@
-import { TIMELINE_SET, TIMELINE_UPDATE, TIMELINE_DELETE } from '../actions/timelines';
-import { REBLOG_SUCCESS, FAVOURITE_SUCCESS }              from '../actions/interactions';
-import { ACCOUNT_SET_SELF, ACCOUNT_FETCH_SUCCESS }        from '../actions/accounts';
-import { STATUS_FETCH_SUCCESS }                           from '../actions/statuses';
-import Immutable                                          from 'immutable';
+import { TIMELINE_SET, TIMELINE_UPDATE, TIMELINE_DELETE }                                            from '../actions/timelines';
+import { REBLOG_SUCCESS, FAVOURITE_SUCCESS }                                                         from '../actions/interactions';
+import { ACCOUNT_SET_SELF, ACCOUNT_FETCH_SUCCESS, ACCOUNT_FOLLOW_SUCCESS, ACCOUNT_UNFOLLOW_SUCCESS } from '../actions/accounts';
+import { STATUS_FETCH_SUCCESS }                                                                      from '../actions/statuses';
+import { FOLLOW_SUBMIT_SUCCESS }                                                                     from '../actions/follow';
+import Immutable                                                                                     from 'immutable';
 
 const initialState = Immutable.Map({
   home: Immutable.List([]),
@@ -97,6 +98,9 @@ export default function timelines(state = initialState, action) {
         map.set('me', action.account.id);
       });
     case ACCOUNT_FETCH_SUCCESS:
+    case FOLLOW_SUBMIT_SUCCESS:
+    case ACCOUNT_FOLLOW_SUCCESS:
+    case ACCOUNT_UNFOLLOW_SUCCESS:
       return accountToMaps(state, Immutable.fromJS(action.account));
     case STATUS_FETCH_SUCCESS:
       return contextToMaps(state, Immutable.fromJS(action.status), Immutable.fromJS(action.context.ancestors), Immutable.fromJS(action.context.descendants));