2022-09-01 11:00:49 +00:00
|
|
|
import ReducerRegistry from '../base/redux/ReducerRegistry';
|
2018-02-26 16:14:46 +00:00
|
|
|
|
2020-03-30 14:17:18 +00:00
|
|
|
import {
|
|
|
|
SET_AUDIO_SETTINGS_VISIBILITY,
|
|
|
|
SET_VIDEO_SETTINGS_VISIBILITY
|
|
|
|
} from './actionTypes';
|
2018-02-26 16:14:46 +00:00
|
|
|
|
2022-09-01 11:00:49 +00:00
|
|
|
export interface ISettingsState {
|
|
|
|
audioSettingsVisible?: boolean;
|
|
|
|
videoSettingsVisible?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
ReducerRegistry.register('features/settings', (state: ISettingsState = {}, action) => {
|
2018-02-26 16:14:46 +00:00
|
|
|
switch (action.type) {
|
2020-03-30 14:17:18 +00:00
|
|
|
case SET_AUDIO_SETTINGS_VISIBILITY:
|
|
|
|
return {
|
|
|
|
...state,
|
|
|
|
audioSettingsVisible: action.value
|
|
|
|
};
|
|
|
|
case SET_VIDEO_SETTINGS_VISIBILITY:
|
|
|
|
return {
|
|
|
|
...state,
|
|
|
|
videoSettingsVisible: action.value
|
|
|
|
};
|
2018-02-26 16:14:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return state;
|
|
|
|
});
|