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 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. });