feat(native-participants-pane) fixed lint errors
This commit is contained in:
parent
14a5c45fa3
commit
e7a324185f
|
@ -5,12 +5,8 @@ import type { Dispatch } from 'redux';
|
|||
import { openDialog } from '../../../base/dialog';
|
||||
import { translate } from '../../../base/i18n';
|
||||
import { IconParticipants } from '../../../base/icons';
|
||||
import { setActiveModalId } from '../../../base/modal';
|
||||
import { connect } from '../../../base/redux';
|
||||
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
|
||||
import {
|
||||
PARTICIPANTS_PANE_ID
|
||||
} from '../../../invite/constants';
|
||||
|
||||
import { ParticipantsPane } from './';
|
||||
|
||||
|
@ -39,7 +35,6 @@ class ParticipantsPaneButton extends AbstractButton<Props, *> {
|
|||
*/
|
||||
_handleClick() {
|
||||
this.props.dispatch(openDialog(ParticipantsPane));
|
||||
this.props.dispatch(setActiveModalId(PARTICIPANTS_PANE_ID));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@ import React, { useCallback } from 'react';
|
|||
import { useTranslation } from 'react-i18next';
|
||||
import { useSelector, useDispatch } from 'react-redux';
|
||||
|
||||
import { withPixelLineHeight } from '../../../base/styles/functions.web';
|
||||
import { admitMultiple } from '../../../lobby/actions.web';
|
||||
import { getLobbyState } from '../../../lobby/functions';
|
||||
import { withPixelLineHeight } from '../../base/styles/functions.web';
|
||||
import { admitMultiple } from '../../lobby/actions.web';
|
||||
|
||||
import { LobbyParticipantItem } from './LobbyParticipantItem';
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ import {
|
|||
getRemoteParticipants,
|
||||
muteRemoteParticipant
|
||||
} from '../base/participants';
|
||||
import { getIsParticipantAudioMuted } from '../base/tracks';
|
||||
import { setKnockingParticipantApproval } from '../lobby/actions';
|
||||
import { getLobbyState } from '../lobby/functions';
|
||||
|
||||
declare var APP: Object;
|
||||
|
||||
|
@ -112,12 +112,13 @@ export function muteAllParticipants(exclude: Array<string>, mediaType: MEDIA_TYP
|
|||
/**
|
||||
* Admit all knocking participants.
|
||||
*
|
||||
* @param {Array<Object>} knockingParticipants - Array of participants waiting in lobby.
|
||||
* @param {boolean} lobbyEnabled - Is lobby mode enabled.
|
||||
*
|
||||
* @returns {Function}
|
||||
*/
|
||||
export function admitAllKnockingParticipants() {
|
||||
return (dispatch: Dispatch<any>, getState: Function) => {
|
||||
const state = getState();
|
||||
const { knockingParticipants, lobbyEnabled } = getLobbyState(state);
|
||||
export function admitAllKnockingParticipants(knockingParticipants: Array<Object>, lobbyEnabled: boolean) {
|
||||
return (dispatch: Dispatch<any>) => {
|
||||
const knockingParticipantsIds = knockingParticipants.map(participant => participant.id);
|
||||
|
||||
knockingParticipantsIds
|
||||
|
@ -125,3 +126,19 @@ export function admitAllKnockingParticipants() {
|
|||
.map(dispatch);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Don't allow participants to unmute.
|
||||
*
|
||||
* @returns {Function}
|
||||
*/
|
||||
export function dontAllowUnmute() {
|
||||
return (dispatch: Dispatch<any>, getState: Function) => {
|
||||
const state = getState();
|
||||
const participants = state['features/base/participants'];
|
||||
|
||||
participants
|
||||
.map(p => !getIsParticipantAudioMuted(p) && setAudioMuted(true));
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue