import React, { PureComponent } from 'react'; import { View } from 'react-native'; import { translate } from '../../../base/i18n/functions'; import { isLocalParticipantModerator } from '../../../base/participants/functions'; import { connect } from '../../../base/redux'; import Button from '../../../base/ui/components/native/Button'; import { BUTTON_TYPES } from '../../../base/ui/constants.native'; import { handleLobbyChatInitialized } from '../../../chat/actions.native'; import { navigate } from '../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef'; import { screen } from '../../../mobile/navigation/routes'; import ParticipantItem from '../../../participants-pane/components/native/ParticipantItem'; import { setKnockingParticipantApproval } from '../../actions.native'; import { getKnockingParticipants, getLobbyEnabled, showLobbyChatButton } from '../../functions'; import styles from './styles'; /** * Props type of the component. */ export type Props = { /** * The list of participants. */ _participants: Array, /** * True if the list should be rendered. */ _visible: boolean, /** * True if the polls feature is disabled. */ _isPollsDisabled: boolean, /** * Returns true if the lobby chat button should be shown. */ _showChatButton: Function, /** * The Redux Dispatch function. */ dispatch: Function }; /** * Component to render a list for the actively knocking participants. */ class KnockingParticipantList extends PureComponent { /** * Instantiates a new component. * * @param {Object} props - The read-only properties with which the new * instance is to be initialized. */ constructor(props: Props) { super(props); this._onRespondToParticipant = this._onRespondToParticipant.bind(this); } /** * Implements {@code PureComponent#render}. * * @inheritdoc */ render() { const { _participants, _visible, _showChatButton } = this.props; if (!_visible) { return null; } return ( <> { _participants.map(p => (