You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728
  1. import ReducerRegistry from '../base/redux/ReducerRegistry';
  2. import {
  3. SET_AUDIO_SETTINGS_VISIBILITY,
  4. SET_VIDEO_SETTINGS_VISIBILITY
  5. } from './actionTypes';
  6. export interface ISettingsState {
  7. audioSettingsVisible?: boolean;
  8. videoSettingsVisible?: boolean;
  9. }
  10. ReducerRegistry.register('features/settings', (state: ISettingsState = {}, action) => {
  11. switch (action.type) {
  12. case SET_AUDIO_SETTINGS_VISIBILITY:
  13. return {
  14. ...state,
  15. audioSettingsVisible: action.value
  16. };
  17. case SET_VIDEO_SETTINGS_VISIBILITY:
  18. return {
  19. ...state,
  20. videoSettingsVisible: action.value
  21. };
  22. }
  23. return state;
  24. });