2022-08-26 09:54:16 +00:00
|
|
|
import ReducerRegistry from '../../base/redux/ReducerRegistry';
|
2021-01-21 12:07:00 +00:00
|
|
|
|
|
|
|
import { SCREEN_SHARE_PARTICIPANTS_UPDATED } from './actionTypes';
|
|
|
|
|
2022-08-26 09:54:16 +00:00
|
|
|
export interface IMobileExternalApiState {
|
|
|
|
screenShares: string[];
|
|
|
|
}
|
|
|
|
|
2021-01-21 12:07:00 +00:00
|
|
|
const DEFAULT_STATE = {
|
|
|
|
screenShares: []
|
|
|
|
};
|
|
|
|
|
2022-09-05 09:05:07 +00:00
|
|
|
ReducerRegistry.register<IMobileExternalApiState>('features/mobile/external-api',
|
|
|
|
(state = DEFAULT_STATE, action): IMobileExternalApiState => {
|
2021-01-21 12:07:00 +00:00
|
|
|
switch (action.type) {
|
|
|
|
case SCREEN_SHARE_PARTICIPANTS_UPDATED: {
|
|
|
|
return {
|
|
|
|
...state,
|
|
|
|
screenShares: action.participantIds
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return state;
|
|
|
|
});
|