您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

reducer.js 565B

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