feat(native-participants-pane) removed unused prop and added onPress condition

This commit is contained in:
Calin Chitu 2021-06-15 14:00:19 +03:00 committed by Hristo Terezov
parent 1afae50923
commit 80b49266ab
5 changed files with 15 additions and 281 deletions

View File

@ -7,9 +7,10 @@ import { Divider, Text } from 'react-native-paper';
import { useDispatch, useSelector, useStore } from 'react-redux'; import { useDispatch, useSelector, useStore } from 'react-redux';
import { Avatar } from '../../../base/avatar'; import { Avatar } from '../../../base/avatar';
import { hideDialog, openDialog } from '../../../base/dialog'; import { hideDialog, openDialog } from '../../../base/dialog/actions';
import BottomSheet from '../../../base/dialog/components/native/BottomSheet'; import BottomSheet from '../../../base/dialog/components/native/BottomSheet';
import { import {
// eslint-disable-next-line no-unused-vars
Icon, IconCloseCircle, IconConnectionActive, IconMessage, Icon, IconCloseCircle, IconConnectionActive, IconMessage,
IconMicrophoneEmptySlash, IconMicrophoneEmptySlash,
IconMuteEveryoneElse, IconVideoOff IconMuteEveryoneElse, IconVideoOff
@ -159,14 +160,15 @@ export const ContextMenuMeetingParticipantDetails = ({ participant: p }: Props)
{ t('toolbar.accessibilityLabel.privateMessage') } { t('toolbar.accessibilityLabel.privateMessage') }
</Text> </Text>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity {/* We need design specs for this*/}
style = { styles.contextMenuItemSection }> {/* <TouchableOpacity*/}
<Icon {/* style = { styles.contextMenuItemSection }>*/}
size = { 20 } {/* <Icon*/}
src = { IconConnectionActive } {/* size = { 20 }*/}
style = { styles.contextMenuItemIcon } /> {/* src = { IconConnectionActive }*/}
<Text style = { styles.contextMenuItemText }>{ t('participantsPane.actions.networkStats') }</Text> {/* style = { styles.contextMenuItemIcon } />*/}
</TouchableOpacity> {/* <Text style = { styles.contextMenuItemText }>{ t('participantsPane.actions.networkStats') }</Text>*/}
{/* </TouchableOpacity>*/}
<Divider style = { styles.divider } /> <Divider style = { styles.divider } />
<VolumeSlider <VolumeSlider
initialValue = { volume } initialValue = { volume }

View File

@ -24,12 +24,7 @@ type Props = {
/** /**
* Array of participant IDs to not mute * Array of participant IDs to not mute
*/ */
exclude: Array<string>, exclude: Array<string>
/**
* Participant reference
*/
participant: Object
}; };
export const ContextMenuMore = ({ exclude }: Props) => { export const ContextMenuMore = ({ exclude }: Props) => {

View File

@ -32,7 +32,7 @@ export const MeetingParticipantItem = ({ participant: p }: Props) => {
audioMuteState = { isAudioMuted ? MediaState.Muted : MediaState.Unmuted } audioMuteState = { isAudioMuted ? MediaState.Muted : MediaState.Unmuted }
isKnockingParticipant = { false } isKnockingParticipant = { false }
name = { p.name } name = { p.name }
onPress = { openContextMenuDetails } onPress = { !p.local && openContextMenuDetails }
participant = { p } participant = { p }
videoMuteState = { isVideoMuted ? MediaState.Muted : MediaState.Unmuted } /> videoMuteState = { isVideoMuted ? MediaState.Muted : MediaState.Unmuted } />
); );

View File

@ -1,264 +0,0 @@
export const participants = [
{
audioOutputDeviceId: 'default',
avatarURL: undefined,
botType: undefined,
conference: undefined,
connectionStatus: undefined,
dominantSpeaker: false,
email: undefined,
id: 'd0816677',
isFakeParticipant: undefined,
isJigasi: undefined,
loadableAvatarUrl: undefined,
local: true,
name: 'testuser2',
pinned: false,
presence: undefined,
role: 'moderator',
startWithAudioMuted: true,
startWithVideoMuted: true
},
{
audioOutputDeviceId: 'default',
avatarURL: undefined,
botType: undefined,
conference: undefined,
connectionStatus: undefined,
dominantSpeaker: false,
email: undefined,
id: 'a0496597',
isFakeParticipant: undefined,
isJigasi: undefined,
loadableAvatarUrl: undefined,
local: true,
name: 'me',
pinned: false,
presence: undefined,
raisedHand: true,
role: 'participant',
startWithAudioMuted: true,
startWithVideoMuted: false
},
{
audioOutputDeviceId: 'default',
avatarURL: undefined,
botType: undefined,
conference: undefined,
connectionStatus: undefined,
dominantSpeaker: false,
email: undefined,
id: 'b01081018',
isFakeParticipant: undefined,
isJigasi: undefined,
loadableAvatarUrl: undefined,
local: true,
name: 'Tom',
pinned: false,
presence: undefined,
role: 'participant',
startWithAudioMuted: true,
startWithVideoMuted: false
},
{
audioOutputDeviceId: 'default',
avatarURL: undefined,
botType: undefined,
conference: undefined,
connectionStatus: undefined,
dominantSpeaker: false,
email: undefined,
id: 'b0aad221e1',
isFakeParticipant: undefined,
isJigasi: undefined,
loadableAvatarUrl: undefined,
local: true,
name: 'George',
pinned: false,
presence: undefined,
role: 'participant',
startWithAudioMuted: true,
startWithVideoMuted: false
},
{
audioOutputDeviceId: 'default',
avatarURL: undefined,
botType: undefined,
conference: undefined,
connectionStatus: undefined,
dominantSpeaker: false,
email: undefined,
id: 'c0108301',
isFakeParticipant: undefined,
isJigasi: undefined,
loadableAvatarUrl: undefined,
local: true,
name: 'Carlin Teodor',
pinned: false,
presence: undefined,
raisedHand: true,
role: 'participant',
startWithAudioMuted: true,
startWithVideoMuted: false
},
{
audioOutputDeviceId: 'default',
avatarURL: undefined,
botType: undefined,
conference: undefined,
connectionStatus: undefined,
dominantSpeaker: false,
email: undefined,
id: 'd082114',
isFakeParticipant: undefined,
isJigasi: undefined,
loadableAvatarUrl: undefined,
local: true,
name: 'testuser2',
pinned: false,
presence: undefined,
role: 'moderator',
startWithAudioMuted: true,
startWithVideoMuted: true
},
{
audioOutputDeviceId: 'default',
avatarURL: undefined,
botType: undefined,
conference: undefined,
connectionStatus: undefined,
dominantSpeaker: false,
email: undefined,
id: 'd08774533',
isFakeParticipant: undefined,
isJigasi: undefined,
loadableAvatarUrl: undefined,
local: true,
name: 'testuser2',
pinned: false,
presence: undefined,
role: 'moderator',
startWithAudioMuted: true,
startWithVideoMuted: true
},
{
audioOutputDeviceId: 'default',
avatarURL: undefined,
botType: undefined,
conference: undefined,
connectionStatus: undefined,
dominantSpeaker: false,
email: undefined,
id: 'd063636',
isFakeParticipant: undefined,
isJigasi: undefined,
loadableAvatarUrl: undefined,
local: true,
name: 'testuser2',
pinned: false,
presence: undefined,
role: 'moderator',
startWithAudioMuted: true,
startWithVideoMuted: true
},
{
audioOutputDeviceId: 'default',
avatarURL: undefined,
botType: undefined,
conference: undefined,
connectionStatus: undefined,
dominantSpeaker: false,
email: undefined,
id: 'dadagqrq1',
isFakeParticipant: undefined,
isJigasi: undefined,
loadableAvatarUrl: undefined,
local: true,
name: 'testuser2',
pinned: false,
presence: undefined,
role: 'moderator',
startWithAudioMuted: true,
startWithVideoMuted: true
},
{
audioOutputDeviceId: 'default',
avatarURL: undefined,
botType: undefined,
conference: undefined,
connectionStatus: undefined,
dominantSpeaker: false,
email: undefined,
id: 'd0aad',
isFakeParticipant: undefined,
isJigasi: undefined,
loadableAvatarUrl: undefined,
local: true,
name: 'testuser2',
pinned: false,
presence: undefined,
role: 'moderator',
startWithAudioMuted: true,
startWithVideoMuted: true
},
{
audioOutputDeviceId: 'default',
avatarURL: undefined,
botType: undefined,
conference: undefined,
connectionStatus: undefined,
dominantSpeaker: false,
email: undefined,
id: 'd0866327',
isFakeParticipant: undefined,
isJigasi: undefined,
loadableAvatarUrl: undefined,
local: true,
name: 'testuser2',
pinned: false,
presence: undefined,
role: 'moderator',
startWithAudioMuted: true,
startWithVideoMuted: true
},
{
audioOutputDeviceId: 'default',
avatarURL: undefined,
botType: undefined,
conference: undefined,
connectionStatus: undefined,
dominantSpeaker: false,
email: undefined,
id: 'd08162234',
isFakeParticipant: undefined,
isJigasi: undefined,
loadableAvatarUrl: undefined,
local: true,
name: 'testuser2',
pinned: false,
presence: undefined,
role: 'moderator',
startWithAudioMuted: true,
startWithVideoMuted: true
},
{
audioOutputDeviceId: 'default',
avatarURL: undefined,
botType: undefined,
conference: undefined,
connectionStatus: undefined,
dominantSpeaker: false,
email: undefined,
id: 'd04141',
isFakeParticipant: undefined,
isJigasi: undefined,
loadableAvatarUrl: undefined,
local: true,
name: 'testuser2',
pinned: false,
presence: undefined,
role: 'moderator',
startWithAudioMuted: true,
startWithVideoMuted: true
}
];

View File

@ -1,7 +1,8 @@
// @flow // @flow
import Slider from '@react-native-community/slider';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Slider, View } from 'react-native'; import { View } from 'react-native';
import { withTheme } from 'react-native-paper'; import { withTheme } from 'react-native-paper';
import { Icon, IconVolumeEmpty } from '../../../base/icons'; import { Icon, IconVolumeEmpty } from '../../../base/icons';