]>
cat aescling's git repositories - mastodon.git/blob - app/javascript/flavours/glitch/reducers/local_settings.js
2 import { Map as ImmutableMap
} from 'immutable';
5 import { STORE_HYDRATE
} from 'flavours/glitch/actions/store';
6 import { LOCAL_SETTING_CHANGE
} from 'flavours/glitch/actions/local_settings';
8 const initialState
= ImmutableMap({
13 side_arm_reply_mode : 'keep',
14 show_reply_count : false,
15 always_show_spoilers_field: false,
16 confirm_missing_media_description: false,
17 preselect_on_reply: true,
18 content_warnings : ImmutableMap({
22 collapsed : ImmutableMap({
32 backgrounds : ImmutableMap({
33 user_backgrounds : false,
34 preview_images : false,
36 show_action_bar : true,
38 media : ImmutableMap({
42 notifications : ImmutableMap({
43 favicon_badge : false,
48 const hydrate
= (state
, localSettings
) => state
.mergeDeep(localSettings
);
50 export default function localSettings(state
= initialState
, action
) {
53 return hydrate(state
, action
.state
.get('local_settings'));
54 case LOCAL_SETTING_CHANGE:
55 return state
.setIn(action
.key
, action
.value
);
This page took 0.074133 seconds and 4 git commands to generate.