You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

reducer.ts 606B

12345678910111213141516171819202122232425
  1. import ReducerRegistry from '../../base/redux/ReducerRegistry';
  2. import { SCREEN_SHARE_PARTICIPANTS_UPDATED } from './actionTypes';
  3. export interface IMobileExternalApiState {
  4. screenShares: string[];
  5. }
  6. const DEFAULT_STATE = {
  7. screenShares: []
  8. };
  9. ReducerRegistry.register<IMobileExternalApiState>('features/mobile/external-api',
  10. (state = DEFAULT_STATE, action): IMobileExternalApiState => {
  11. switch (action.type) {
  12. case SCREEN_SHARE_PARTICIPANTS_UPDATED: {
  13. return {
  14. ...state,
  15. screenShares: action.participantIds
  16. };
  17. }
  18. }
  19. return state;
  20. });