2022-09-01 11:00:49 +00:00
|
|
|
import ReducerRegistry from '../base/redux/ReducerRegistry';
|
|
|
|
import { set } from '../base/redux/functions';
|
2019-07-23 20:56:05 +00:00
|
|
|
|
|
|
|
import { SET_CURRENT_NOTIFICATION_UID } from './actionTypes';
|
|
|
|
|
2022-09-01 11:00:49 +00:00
|
|
|
export interface ITalkWhileMutedState {
|
2022-10-28 06:41:12 +00:00
|
|
|
currentNotificationUid?: string;
|
2022-09-01 11:00:49 +00:00
|
|
|
}
|
|
|
|
|
2019-07-23 20:56:05 +00:00
|
|
|
/**
|
|
|
|
* Reduces the redux actions of the feature talk while muted.
|
|
|
|
*/
|
2022-09-05 09:05:07 +00:00
|
|
|
ReducerRegistry.register<ITalkWhileMutedState>('features/talk-while-muted',
|
|
|
|
(state = {}, action): ITalkWhileMutedState => {
|
2019-07-23 20:56:05 +00:00
|
|
|
switch (action.type) {
|
|
|
|
case SET_CURRENT_NOTIFICATION_UID:
|
|
|
|
return set(state, 'currentNotificationUid', action.uid);
|
|
|
|
}
|
|
|
|
|
|
|
|
return state;
|
|
|
|
});
|