Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(native-participants-pane) separated native actions from web actions and created any actions for the common ones
Calin Chitu8b44e06f2c62
diff --git a/react/features/lobby/actions.any.js b/react/features/lobby/actions.any.jsindex 75f6f5b899..6ae4745a70 100644--- a/react/features/lobby/actions.any.js+++ b/react/features/lobby/actions.any.js@@ -23,3 +23,24 @@ export function toggleLobbyMode(enabled: boolean) {}};}++/**+ * Approves (lets in) or rejects a knocking participant.+ *+ * @param {string} id - The id of the knocking participant.+ * @param {boolean} approved - True if the participant is approved, false otherwise.+ * @returns {Function}+ */+export function setKnockingParticipantApproval(id: string, approved: boolean) {+ return async (dispatch: Dispatch<any>, getState: Function) => {+ const conference = getCurrentConference(getState);++ if (conference) {+ if (approved) {+ conference.lobbyApproveAccess(id);+ } else {+ conference.lobbyDenyAccess(id);+ }+ }+ };+}diff --git a/react/features/lobby/actions.native.js b/react/features/lobby/actions.native.jsindex 19f68c8087..b35b46839d 100644--- a/react/features/lobby/actions.native.js+++ b/react/features/lobby/actions.native.js@@ -5,6 +5,7 @@ import { openDialog } from '../base/dialog';import { DisableLobbyModeDialog, EnableLobbyModeDialog } from './components/native';export * from './actions.web';+export * from './actions.any';/*** Action to show the dialog to disable lobby mode.diff --git a/react/features/participants-pane/actions.js b/react/features/participants-pane/actions.any.jssimilarity index 100%rename from react/features/participants-pane/actions.jsrename to react/features/participants-pane/actions.any.jsdiff --git a/react/features/participants-pane/actions.native.js b/react/features/participants-pane/actions.native.jsnew file mode 100644index 0000000000..7e5279fe73--- /dev/null+++ b/react/features/participants-pane/actions.native.js@@ -0,0 +1,3 @@+// @flow++export * from './actions.any';diff --git a/react/features/participants-pane/actions.web.js b/react/features/participants-pane/actions.web.jsnew file mode 100644index 0000000000..7e5279fe73--- /dev/null+++ b/react/features/participants-pane/actions.web.js@@ -0,0 +1,3 @@+// @flow++export * from './actions.any';diff --git a/react/features/participants-pane/components/native/LobbyParticipantItem.js b/react/features/participants-pane/components/native/LobbyParticipantItem.jsindex e7c3ef4439..ec4671d8da 100644--- a/react/features/participants-pane/components/native/LobbyParticipantItem.js+++ b/react/features/participants-pane/components/native/LobbyParticipantItem.js@@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next';import { Button } from 'react-native-paper';import { useDispatch } from 'react-redux';-// import { setKnockingParticipantApproval } from '../../../lobby/actions';+import { setKnockingParticipantApproval } from '../../../lobby/actions.native';import { MediaState } from '../../constants';import ParticipantItem from './ParticipantItem';diff --git a/react/features/participants-pane/components/native/ParticipantItem.js b/react/features/participants-pane/components/native/ParticipantItem.jsindex fa2af329fa..7ac3a813c6 100644--- a/react/features/participants-pane/components/native/ParticipantItem.js+++ b/react/features/participants-pane/components/native/ParticipantItem.js@@ -8,8 +8,12 @@ import { useSelector } from 'react-redux';import { Avatar } from '../../../base/avatar';import { getParticipantDisplayNameWithId } from '../../../base/participants';-import { ActionTrigger, MediaState } from '../../constants';-// import { AudioStateIcons, VideoStateIcons } from '../web/ParticipantItem';+import {+ ActionTrigger,+ AudioStateIcons,+ MediaState,+ VideoStateIcons+} from '../../constants';import { RaisedHandIndicator } from './RaisedHandIndicator';import styles from './styles';diff --git a/react/features/participants-pane/components/native/ParticipantsPane.js b/react/features/participants-pane/components/native/ParticipantsPane.jsindex be3b18ede3..6fbaf375f3 100644--- a/react/features/participants-pane/components/native/ParticipantsPane.js+++ b/react/features/participants-pane/components/native/ParticipantsPane.js@@ -9,7 +9,7 @@ import { useDispatch, useSelector } from 'react-redux';import { IconClose, IconHorizontalPoints } from '../../../base/icons';import { JitsiModal } from '../../../base/modal';import { isLocalParticipantModerator } from '../../../base/participants';-import { close } from '../../actions';+import { close } from '../../actions.native';import Button from './Button';import { LobbyParticipantList } from './LobbyParticipantList';