Commiting

This commit is contained in:
mgabdev
2020-11-15 12:48:32 -06:00
parent 62515bbaee
commit fb612f60c8
1011 changed files with 3507 additions and 49604 deletions

View File

@@ -31,6 +31,7 @@ const initialState = ImmutableMap({
top: false,
unread: 0,
isLoading: false,
isError: false,
queuedNotifications: ImmutableList(), //max = MAX_QUEUED_NOTIFICATIONS
totalQueuedNotificationsCount: 0, //used for queuedItems overflow for MAX_QUEUED_NOTIFICATIONS+
lastReadId: -1,
@@ -271,7 +272,10 @@ export default function notifications(state = initialState, action) {
case NOTIFICATIONS_EXPAND_REQUEST:
return state.set('isLoading', true);
case NOTIFICATIONS_EXPAND_FAIL:
return state.set('isLoading', false);
return state.withMutations(mutable => {
mutable.set('isLoading', false)
mutable.set('isError', true)
})
case NOTIFICATIONS_FILTER_SET:
return state.withMutations(mutable => {
mutable.set('items', ImmutableList()).set('hasMore', true)