Browse Source

feat(native-participants-pane) fixed lint errors

master
Calin Chitu 4 years ago
parent
commit
e7a324185f

+ 0
- 5
react/features/participants-pane/components/native/ParticipantsPaneButton.js View File

5
 import { openDialog } from '../../../base/dialog';
5
 import { openDialog } from '../../../base/dialog';
6
 import { translate } from '../../../base/i18n';
6
 import { translate } from '../../../base/i18n';
7
 import { IconParticipants } from '../../../base/icons';
7
 import { IconParticipants } from '../../../base/icons';
8
-import { setActiveModalId } from '../../../base/modal';
9
 import { connect } from '../../../base/redux';
8
 import { connect } from '../../../base/redux';
10
 import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
9
 import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
11
-import {
12
-    PARTICIPANTS_PANE_ID
13
-} from '../../../invite/constants';
14
 
10
 
15
 import { ParticipantsPane } from './';
11
 import { ParticipantsPane } from './';
16
 
12
 
39
      */
35
      */
40
     _handleClick() {
36
     _handleClick() {
41
         this.props.dispatch(openDialog(ParticipantsPane));
37
         this.props.dispatch(openDialog(ParticipantsPane));
42
-        this.props.dispatch(setActiveModalId(PARTICIPANTS_PANE_ID));
43
     }
38
     }
44
 }
39
 }
45
 
40
 

+ 2
- 2
react/features/participants-pane/components/web/LobbyParticipantList.js View File

5
 import { useTranslation } from 'react-i18next';
5
 import { useTranslation } from 'react-i18next';
6
 import { useSelector, useDispatch } from 'react-redux';
6
 import { useSelector, useDispatch } from 'react-redux';
7
 
7
 
8
+import { withPixelLineHeight } from '../../../base/styles/functions.web';
9
+import { admitMultiple } from '../../../lobby/actions.web';
8
 import { getLobbyState } from '../../../lobby/functions';
10
 import { getLobbyState } from '../../../lobby/functions';
9
-import { withPixelLineHeight } from '../../base/styles/functions.web';
10
-import { admitMultiple } from '../../lobby/actions.web';
11
 
11
 
12
 import { LobbyParticipantItem } from './LobbyParticipantItem';
12
 import { LobbyParticipantItem } from './LobbyParticipantItem';
13
 
13
 

+ 22
- 5
react/features/video-menu/actions.any.js View File

23
     getRemoteParticipants,
23
     getRemoteParticipants,
24
     muteRemoteParticipant
24
     muteRemoteParticipant
25
 } from '../base/participants';
25
 } from '../base/participants';
26
+import { getIsParticipantAudioMuted } from '../base/tracks';
26
 import { setKnockingParticipantApproval } from '../lobby/actions';
27
 import { setKnockingParticipantApproval } from '../lobby/actions';
27
-import { getLobbyState } from '../lobby/functions';
28
 
28
 
29
 declare var APP: Object;
29
 declare var APP: Object;
30
 
30
 
112
 /**
112
 /**
113
  * Admit all knocking participants.
113
  * Admit all knocking participants.
114
  *
114
  *
115
+ * @param {Array<Object>} knockingParticipants - Array of participants waiting in lobby.
116
+ * @param {boolean} lobbyEnabled - Is lobby mode enabled.
117
+ *
115
  * @returns {Function}
118
  * @returns {Function}
116
  */
119
  */
117
-export function admitAllKnockingParticipants() {
118
-    return (dispatch: Dispatch<any>, getState: Function) => {
119
-        const state = getState();
120
-        const { knockingParticipants, lobbyEnabled } = getLobbyState(state);
120
+export function admitAllKnockingParticipants(knockingParticipants: Array<Object>, lobbyEnabled: boolean) {
121
+    return (dispatch: Dispatch<any>) => {
121
         const knockingParticipantsIds = knockingParticipants.map(participant => participant.id);
122
         const knockingParticipantsIds = knockingParticipants.map(participant => participant.id);
122
 
123
 
123
         knockingParticipantsIds
124
         knockingParticipantsIds
125
             .map(dispatch);
126
             .map(dispatch);
126
     };
127
     };
127
 }
128
 }
129
+
130
+
131
+/**
132
+ * Don't allow participants to unmute.
133
+ *
134
+ * @returns {Function}
135
+ */
136
+export function dontAllowUnmute() {
137
+    return (dispatch: Dispatch<any>, getState: Function) => {
138
+        const state = getState();
139
+        const participants = state['features/base/participants'];
140
+
141
+        participants
142
+            .map(p => !getIsParticipantAudioMuted(p) && setAudioMuted(true));
143
+    };
144
+}

Loading…
Cancel
Save