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.js 971B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import { ReducerRegistry } from '../base/redux';
  2. import {
  3. SET_INFO_DIALOG_VISIBILITY,
  4. UPDATE_DIAL_IN_NUMBERS_FAILED,
  5. UPDATE_DIAL_IN_NUMBERS_SUCCESS
  6. } from './actionTypes';
  7. const DEFAULT_STATE = {
  8. // By default show the info dialog when joining the conference.
  9. infoDialogVisible: true,
  10. numbersEnabled: true
  11. };
  12. ReducerRegistry.register('features/invite', (state = DEFAULT_STATE, action) => {
  13. switch (action.type) {
  14. case SET_INFO_DIALOG_VISIBILITY:
  15. return {
  16. ...state,
  17. infoDialogVisible: action.visible
  18. };
  19. case UPDATE_DIAL_IN_NUMBERS_FAILED:
  20. return {
  21. ...state,
  22. error: action.error
  23. };
  24. case UPDATE_DIAL_IN_NUMBERS_SUCCESS: {
  25. const { numbers, numbersEnabled } = action.dialInNumbers;
  26. return {
  27. conferenceID: action.conferenceID,
  28. numbers,
  29. numbersEnabled
  30. };
  31. }
  32. }
  33. return state;
  34. });