Selaa lähdekoodia

feat(native-participants-pane) fixed lint errors

master
Calin Chitu 4 vuotta sitten
vanhempi
commit
e7a324185f

+ 0
- 5
react/features/participants-pane/components/native/ParticipantsPaneButton.js Näytä tiedosto

@@ -5,12 +5,8 @@ import type { Dispatch } from 'redux';
5 5
 import { openDialog } from '../../../base/dialog';
6 6
 import { translate } from '../../../base/i18n';
7 7
 import { IconParticipants } from '../../../base/icons';
8
-import { setActiveModalId } from '../../../base/modal';
9 8
 import { connect } from '../../../base/redux';
10 9
 import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
11
-import {
12
-    PARTICIPANTS_PANE_ID
13
-} from '../../../invite/constants';
14 10
 
15 11
 import { ParticipantsPane } from './';
16 12
 
@@ -39,7 +35,6 @@ class ParticipantsPaneButton extends AbstractButton<Props, *> {
39 35
      */
40 36
     _handleClick() {
41 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 Näytä tiedosto

@@ -5,9 +5,9 @@ import React, { useCallback } from 'react';
5 5
 import { useTranslation } from 'react-i18next';
6 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 10
 import { getLobbyState } from '../../../lobby/functions';
9
-import { withPixelLineHeight } from '../../base/styles/functions.web';
10
-import { admitMultiple } from '../../lobby/actions.web';
11 11
 
12 12
 import { LobbyParticipantItem } from './LobbyParticipantItem';
13 13
 

+ 22
- 5
react/features/video-menu/actions.any.js Näytä tiedosto

@@ -23,8 +23,8 @@ import {
23 23
     getRemoteParticipants,
24 24
     muteRemoteParticipant
25 25
 } from '../base/participants';
26
+import { getIsParticipantAudioMuted } from '../base/tracks';
26 27
 import { setKnockingParticipantApproval } from '../lobby/actions';
27
-import { getLobbyState } from '../lobby/functions';
28 28
 
29 29
 declare var APP: Object;
30 30
 
@@ -112,12 +112,13 @@ export function muteAllParticipants(exclude: Array<string>, mediaType: MEDIA_TYP
112 112
 /**
113 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 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 122
         const knockingParticipantsIds = knockingParticipants.map(participant => participant.id);
122 123
 
123 124
         knockingParticipantsIds
@@ -125,3 +126,19 @@ export function admitAllKnockingParticipants() {
125 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…
Peruuta
Tallenna