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

reducer.js 480B

12345678910111213141516171819202122232425
  1. // @flow
  2. import { ReducerRegistry } from '../base/redux';
  3. import { TOGGLE_E2EE } from './actionTypes';
  4. const DEFAULT_STATE = {
  5. enabled: false
  6. };
  7. /**
  8. * Reduces the Redux actions of the feature features/e2ee.
  9. */
  10. ReducerRegistry.register('features/e2ee', (state = DEFAULT_STATE, action) => {
  11. switch (action.type) {
  12. case TOGGLE_E2EE:
  13. return {
  14. ...state,
  15. enabled: action.enabled
  16. };
  17. default:
  18. return state;
  19. }
  20. });