選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

actions.native.ts 1.1KB

12345678910111213141516171819202122232425262728293031323334
  1. import { IStore } from '../app/types';
  2. import { openDialog } from '../base/dialog/actions';
  3. // eslint-disable-next-line lines-around-comment
  4. // @ts-ignore
  5. import { AlertDialog } from '../base/dialog/components/native';
  6. import { getParticipantDisplayName } from '../base/participants/functions';
  7. /**
  8. * Notify that we've been kicked out of the conference.
  9. *
  10. * @param {JitsiParticipant} participant - The {@link JitsiParticipant}
  11. * instance which initiated the kick event.
  12. * @param {?Function} submit - The function to execute after submiting the dialog.
  13. * @returns {Function}
  14. */
  15. export function notifyKickedOut(participant: any, submit?: Function) {
  16. return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
  17. if (!participant || participant?.isReplaced?.()) {
  18. submit?.();
  19. return;
  20. }
  21. dispatch(openDialog(AlertDialog, {
  22. contentKey: {
  23. key: 'dialog.kickTitle',
  24. params: {
  25. participantDisplayName: getParticipantDisplayName(getState, participant.getId())
  26. }
  27. },
  28. onSubmit: submit
  29. }));
  30. };
  31. }