mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-27 22:01:35 +01:00
49eef466b8
Port 07b46cb332
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
25 lines
572 B
JavaScript
25 lines
572 B
JavaScript
import Immutable from 'immutable';
|
|
|
|
import {
|
|
BOOSTS_INIT_MODAL,
|
|
BOOSTS_CHANGE_PRIVACY,
|
|
} from 'flavours/glitch/actions/boosts';
|
|
|
|
const initialState = Immutable.Map({
|
|
new: Immutable.Map({
|
|
privacy: 'public',
|
|
}),
|
|
});
|
|
|
|
export default function mutes(state = initialState, action) {
|
|
switch (action.type) {
|
|
case BOOSTS_INIT_MODAL:
|
|
return state.withMutations((state) => {
|
|
state.setIn(['new', 'privacy'], action.privacy);
|
|
});
|
|
case BOOSTS_CHANGE_PRIVACY:
|
|
return state.setIn(['new', 'privacy'], action.privacy);
|
|
default:
|
|
return state;
|
|
}
|
|
}
|