Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

reducer.ts 679B

12345678910111213141516171819202122232425262728293031
  1. import ReducerRegistry from '../base/redux/ReducerRegistry';
  2. import {
  3. SET_NOISE_SUPPRESSION_ENABLED
  4. } from './actionTypes';
  5. export interface INoiseSuppressionState {
  6. enabled: boolean;
  7. }
  8. const DEFAULT_STATE = {
  9. enabled: false
  10. };
  11. /**
  12. * Reduces the Redux actions of the feature features/noise-suppression.
  13. */
  14. ReducerRegistry.register<INoiseSuppressionState>('features/noise-suppression',
  15. (state = DEFAULT_STATE, action): INoiseSuppressionState => {
  16. const { enabled } = action;
  17. switch (action.type) {
  18. case SET_NOISE_SUPPRESSION_ENABLED:
  19. return {
  20. ...state,
  21. enabled
  22. };
  23. default:
  24. return state;
  25. }
  26. });