]> cat aescling's git repositories - mastodon.git/commitdiff
Fix #5632 - Reset column loading status after fetch fail (#5659)
authorEugen Rochko <eugen@zeonfederated.com>
Sun, 12 Nov 2017 03:51:07 +0000 (04:51 +0100)
committerYamagishi Kazutoshi <ykzts@desire.sh>
Sun, 12 Nov 2017 03:51:07 +0000 (12:51 +0900)
app/javascript/mastodon/reducers/notifications.js

index cccf00a1f74a4ccb44141282e742ee12e0516a29..264db4f558f656c86a11b52c501551c9f445c9a2 100644 (file)
@@ -99,9 +99,10 @@ export default function notifications(state = initialState, action) {
   switch(action.type) {
   case NOTIFICATIONS_REFRESH_REQUEST:
   case NOTIFICATIONS_EXPAND_REQUEST:
+    return state.set('isLoading', true);
   case NOTIFICATIONS_REFRESH_FAIL:
   case NOTIFICATIONS_EXPAND_FAIL:
-    return state.set('isLoading', true);
+    return state.set('isLoading', false);
   case NOTIFICATIONS_SCROLL_TOP:
     return updateTop(state, action.top);
   case NOTIFICATIONS_UPDATE: