mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-23 21:38:07 +01:00
07b46cb332
* Various dropdown code quality fixes * Prepare support for privacy selection in boost modal * Add dropdown for boost privacy in boost confirmation modal
25 lines
565 B
JavaScript
25 lines
565 B
JavaScript
import Immutable from 'immutable';
|
|
|
|
import {
|
|
BOOSTS_INIT_MODAL,
|
|
BOOSTS_CHANGE_PRIVACY,
|
|
} from 'mastodon/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;
|
|
}
|
|
}
|