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/notifications.jsx9
-rw-r--r--app/assets/javascripts/components/reducers/timelines.jsx6
2 files changed, 13 insertions, 2 deletions
diff --git a/app/assets/javascripts/components/reducers/notifications.jsx b/app/assets/javascripts/components/reducers/notifications.jsx
index 8011c419d..63a814bef 100644
--- a/app/assets/javascripts/components/reducers/notifications.jsx
+++ b/app/assets/javascripts/components/reducers/notifications.jsx
@@ -1,6 +1,11 @@
 import { COMPOSE_SUBMIT_FAIL, COMPOSE_UPLOAD_FAIL } from '../actions/compose';
 import { FOLLOW_SUBMIT_FAIL }                       from '../actions/follow';
-import { REBLOG_FAIL, FAVOURITE_FAIL }              from '../actions/interactions';
+import {
+  REBLOG_FAIL,
+  UNREBLOG_FAIL,
+  FAVOURITE_FAIL,
+  UNFAVOURITE_FAIL
+}                                                   from '../actions/interactions';
 import {
   TIMELINE_REFRESH_FAIL,
   TIMELINE_EXPAND_FAIL
@@ -55,6 +60,8 @@ export default function notifications(state = initialState, action) {
     case ACCOUNT_TIMELINE_EXPAND_FAIL:
     case STATUS_FETCH_FAIL:
     case STATUS_DELETE_FAIL:
+    case UNREBLOG_FAIL:
+    case UNFAVOURITE_FAIL:
       return notificationFromError(state, action.error);
     case NOTIFICATION_DISMISS:
       return state.filterNot(item => item.get('key') === action.notification.key);
diff --git a/app/assets/javascripts/components/reducers/timelines.jsx b/app/assets/javascripts/components/reducers/timelines.jsx
index c4aae7172..ec42b7825 100644
--- a/app/assets/javascripts/components/reducers/timelines.jsx
+++ b/app/assets/javascripts/components/reducers/timelines.jsx
@@ -6,7 +6,9 @@ import {
 }                                from '../actions/timelines';
 import {
   REBLOG_SUCCESS,
-  FAVOURITE_SUCCESS
+  UNREBLOG_SUCCESS,
+  FAVOURITE_SUCCESS,
+  UNFAVOURITE_SUCCESS
 }                                from '../actions/interactions';
 import {
   ACCOUNT_SET_SELF,
@@ -219,6 +221,8 @@ export default function timelines(state = initialState, action) {
       return deleteStatus(state, action.id);
     case REBLOG_SUCCESS:
     case FAVOURITE_SUCCESS:
+    case UNREBLOG_SUCCESS:
+    case UNFAVOURITE_SUCCESS:
       return normalizeStatus(state, Immutable.fromJS(action.response));
     case ACCOUNT_SET_SELF:
       return setSelf(state, Immutable.fromJS(action.account));