mirror of
https://github.com/mastodon/mastodon.git
synced 2026-04-25 07:56:08 -05:00
simplify announcements reducer a bit
This commit is contained in:
parent
afd5d5c2e5
commit
b7d4c4500d
|
|
@ -61,9 +61,7 @@ const updateAnnouncement = (state, announcement) => {
|
|||
export default function announcementsReducer(state = initialState, action) {
|
||||
switch(action.type) {
|
||||
case ANNOUNCEMENTS_TOGGLE_SHOW:
|
||||
return state.withMutations(map => {
|
||||
map.set('show', !map.get('show'));
|
||||
});
|
||||
return state.set('show', !state.get('show'));
|
||||
case ANNOUNCEMENTS_FETCH_REQUEST:
|
||||
return state.set('isLoading', true);
|
||||
case ANNOUNCEMENTS_FETCH_SUCCESS:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user