您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

actions.native.ts 1.2KB

12345678910111213141516171819202122232425262728293031323334
  1. /* eslint-disable lines-around-comment */
  2. import { IStore } from '../app/types';
  3. import { ADD_PEOPLE_ENABLED } from '../base/flags/constants';
  4. import { getFeatureFlag } from '../base/flags/functions';
  5. // @ts-ignore
  6. import { navigate } from '../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
  7. // @ts-ignore
  8. import { screen } from '../mobile/navigation/routes';
  9. import { beginShareRoom } from '../share-room/actions';
  10. /* eslint-enable lines-around-comment */
  11. import { isAddPeopleEnabled, isDialOutEnabled } from './functions';
  12. export * from './actions.any';
  13. /**
  14. * Starts the process for inviting people. Dpending on the sysstem config it
  15. * may use the system share sheet or the invite peoplee dialog.
  16. *
  17. * @returns {Function}
  18. */
  19. export function doInvitePeople() {
  20. return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
  21. const state = getState();
  22. const addPeopleEnabled = getFeatureFlag(state, ADD_PEOPLE_ENABLED, true)
  23. && (isAddPeopleEnabled(state) || isDialOutEnabled(state));
  24. if (addPeopleEnabled) {
  25. return navigate(screen.conference.invite);
  26. }
  27. return dispatch(beginShareRoom());
  28. };
  29. }