MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / changeSetting

Function changeSetting

src/models/setting.js:15–24  ·  view source on GitHub ↗
(state = defaultSettings, { payload })

Source from the content-addressed store, hash-verified

13 state: defaultSettings,
14 reducers: {
15 changeSetting(state = defaultSettings, { payload }) {
16 const { colorWeak, contentWidth } = payload;
17
18 if (state.contentWidth !== contentWidth && window.dispatchEvent) {
19 window.dispatchEvent(new Event('resize'));
20 }
21
22 updateColorWeak(!!colorWeak);
23 return { ...state, ...payload };
24 },
25 },
26};
27export default SettingModel;

Callers

nothing calls this directly

Calls 1

updateColorWeakFunction · 0.85

Tested by

no test coverage detected