2022-07-20 15:01:16 +00:00
|
|
|
import ReducerRegistry from '../base/redux/ReducerRegistry';
|
2022-07-20 12:31:17 +00:00
|
|
|
|
|
|
|
import {
|
|
|
|
SET_NOISE_SUPPRESSION_ENABLED
|
|
|
|
} from './actionTypes';
|
|
|
|
|
|
|
|
export interface INoiseSuppressionState {
|
|
|
|
enabled: boolean
|
|
|
|
}
|
|
|
|
|
|
|
|
const DEFAULT_STATE = {
|
|
|
|
enabled: false
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reduces the Redux actions of the feature features/noise-suppression.
|
|
|
|
*/
|
2022-09-05 09:05:07 +00:00
|
|
|
ReducerRegistry.register<INoiseSuppressionState>('features/noise-suppression',
|
|
|
|
(state = DEFAULT_STATE, action): INoiseSuppressionState => {
|
2022-07-20 12:31:17 +00:00
|
|
|
const { enabled } = action;
|
|
|
|
|
|
|
|
switch (action.type) {
|
|
|
|
case SET_NOISE_SUPPRESSION_ENABLED:
|
|
|
|
return {
|
|
|
|
...state,
|
|
|
|
enabled
|
|
|
|
};
|
|
|
|
default:
|
|
|
|
return state;
|
|
|
|
}
|
|
|
|
});
|