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.

reducer.js 718B

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