mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Fix notification cleaning mode causing notifications to get stuck (#1868)
This commit is contained in:
parent
27a2edcb79
commit
7e62688a0e
@ -253,10 +253,10 @@ export default function notifications(state = initialState, action) {
|
|||||||
return state.update('items', list => state.get('pendingItems').concat(list.take(40))).set('pendingItems', ImmutableList()).set('unread', 0);
|
return state.update('items', list => state.get('pendingItems').concat(list.take(40))).set('pendingItems', ImmutableList()).set('unread', 0);
|
||||||
case NOTIFICATIONS_EXPAND_REQUEST:
|
case NOTIFICATIONS_EXPAND_REQUEST:
|
||||||
case NOTIFICATIONS_DELETE_MARKED_REQUEST:
|
case NOTIFICATIONS_DELETE_MARKED_REQUEST:
|
||||||
return state.set('isLoading', (nbLoading) => nbLoading + 1);
|
return state.update('isLoading', (nbLoading) => nbLoading + 1);
|
||||||
case NOTIFICATIONS_DELETE_MARKED_FAIL:
|
case NOTIFICATIONS_DELETE_MARKED_FAIL:
|
||||||
case NOTIFICATIONS_EXPAND_FAIL:
|
case NOTIFICATIONS_EXPAND_FAIL:
|
||||||
return state.set('isLoading', (nbLoading) => nbLoading - 1);
|
return state.update('isLoading', (nbLoading) => nbLoading - 1);
|
||||||
case NOTIFICATIONS_FILTER_SET:
|
case NOTIFICATIONS_FILTER_SET:
|
||||||
return state.set('items', ImmutableList()).set('hasMore', true);
|
return state.set('items', ImmutableList()).set('hasMore', true);
|
||||||
case NOTIFICATIONS_SCROLL_TOP:
|
case NOTIFICATIONS_SCROLL_TOP:
|
||||||
@ -291,7 +291,7 @@ export default function notifications(state = initialState, action) {
|
|||||||
return markForDelete(state, action.id, action.yes);
|
return markForDelete(state, action.id, action.yes);
|
||||||
|
|
||||||
case NOTIFICATIONS_DELETE_MARKED_SUCCESS:
|
case NOTIFICATIONS_DELETE_MARKED_SUCCESS:
|
||||||
return deleteMarkedNotifs(state).set('isLoading', (nbLoading) => nbLoading - 1);
|
return deleteMarkedNotifs(state).update('isLoading', (nbLoading) => nbLoading - 1);
|
||||||
|
|
||||||
case NOTIFICATIONS_ENTER_CLEARING_MODE:
|
case NOTIFICATIONS_ENTER_CLEARING_MODE:
|
||||||
st = state.set('cleaningMode', action.yes);
|
st = state.set('cleaningMode', action.yes);
|
||||||
|
Loading…
Reference in New Issue
Block a user