2022-08-26 09:54:16 +00:00
|
|
|
import ReducerRegistry from '../base/redux/ReducerRegistry';
|
|
|
|
import { set } from '../base/redux/functions';
|
2019-10-03 08:15:49 +00:00
|
|
|
|
2019-11-22 14:02:59 +00:00
|
|
|
import { SET_NO_AUDIO_SIGNAL_NOTIFICATION_UID } from './actionTypes';
|
2019-10-03 08:15:49 +00:00
|
|
|
|
2022-08-26 09:54:16 +00:00
|
|
|
export interface INoAudioSignalState {
|
2022-10-13 08:26:28 +00:00
|
|
|
noAudioSignalNotificationUid?: string;
|
2022-08-26 09:54:16 +00:00
|
|
|
}
|
|
|
|
|
2019-10-03 08:15:49 +00:00
|
|
|
/**
|
2021-11-04 21:10:43 +00:00
|
|
|
* Reduces the redux actions of the feature no audio signal.
|
2019-10-03 08:15:49 +00:00
|
|
|
*/
|
2022-09-05 09:05:07 +00:00
|
|
|
ReducerRegistry.register<INoAudioSignalState>('features/no-audio-signal', (state = {}, action): INoAudioSignalState => {
|
2019-10-03 08:15:49 +00:00
|
|
|
switch (action.type) {
|
2019-11-22 14:02:59 +00:00
|
|
|
case SET_NO_AUDIO_SIGNAL_NOTIFICATION_UID:
|
2019-10-03 08:15:49 +00:00
|
|
|
return set(state, 'noAudioSignalNotificationUid', action.uid);
|
|
|
|
}
|
|
|
|
|
|
|
|
return state;
|
|
|
|
});
|