2018-02-26 16:14:46 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import { ReducerRegistry } from '../base/redux';
|
|
|
|
|
2020-03-30 14:17:18 +00:00
|
|
|
import {
|
|
|
|
SET_AUDIO_SETTINGS_VISIBILITY,
|
|
|
|
SET_SETTINGS_VIEW_VISIBLE,
|
|
|
|
SET_VIDEO_SETTINGS_VISIBILITY
|
|
|
|
} from './actionTypes';
|
2018-02-26 16:14:46 +00:00
|
|
|
|
|
|
|
ReducerRegistry.register('features/settings', (state = {}, action) => {
|
|
|
|
switch (action.type) {
|
|
|
|
case SET_SETTINGS_VIEW_VISIBLE:
|
|
|
|
return {
|
|
|
|
...state,
|
|
|
|
visible: action.visible
|
|
|
|
};
|
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;
|
|
|
|
});
|