|
|
@ -16,7 +16,7 @@ import { Map as ImmutableMap, List as ImmutableList, Set as ImmutableSet, fromJS |
|
|
|
const initialState = ImmutableMap({ |
|
|
|
const initialState = ImmutableMap({ |
|
|
|
items: ImmutableList(), |
|
|
|
items: ImmutableList(), |
|
|
|
isLoading: false, |
|
|
|
isLoading: false, |
|
|
|
show: true, |
|
|
|
show: false, |
|
|
|
unread: ImmutableSet(), |
|
|
|
unread: ImmutableSet(), |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -84,10 +84,11 @@ export default function announcementsReducer(state = initialState, action) { |
|
|
|
const items = fromJS(action.announcements); |
|
|
|
const items = fromJS(action.announcements); |
|
|
|
|
|
|
|
|
|
|
|
map.set('unread', ImmutableSet()); |
|
|
|
map.set('unread', ImmutableSet()); |
|
|
|
map.set('items', items); |
|
|
|
|
|
|
|
map.set('isLoading', false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addUnread(map, items); |
|
|
|
addUnread(map, items); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
map.set('items', items); |
|
|
|
|
|
|
|
map.set('isLoading', false); |
|
|
|
}); |
|
|
|
}); |
|
|
|
case ANNOUNCEMENTS_FETCH_FAIL: |
|
|
|
case ANNOUNCEMENTS_FETCH_FAIL: |
|
|
|
return state.set('isLoading', false); |
|
|
|
return state.set('isLoading', false); |
|
|
|