From 80b49266ab6fb3cdc9f9cf58c938a3fc70698383 Mon Sep 17 00:00:00 2001 From: Calin Chitu Date: Tue, 15 Jun 2021 14:00:19 +0300 Subject: [PATCH] feat(native-participants-pane) removed unused prop and added onPress condition --- .../ContextMenuMeetingParticipantDetails.js | 20 +- .../components/native/ContextMenuMore.js | 7 +- .../native/MeetingParticipantItem.js | 2 +- .../components/native/participants.js | 264 ------------------ .../components/native/VolumeSlider.js | 3 +- 5 files changed, 15 insertions(+), 281 deletions(-) delete mode 100644 react/features/participants-pane/components/native/participants.js diff --git a/react/features/participants-pane/components/native/ContextMenuMeetingParticipantDetails.js b/react/features/participants-pane/components/native/ContextMenuMeetingParticipantDetails.js index 0f5ca0bcf..fc20b98d7 100644 --- a/react/features/participants-pane/components/native/ContextMenuMeetingParticipantDetails.js +++ b/react/features/participants-pane/components/native/ContextMenuMeetingParticipantDetails.js @@ -7,9 +7,10 @@ import { Divider, Text } from 'react-native-paper'; import { useDispatch, useSelector, useStore } from 'react-redux'; 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 { + // eslint-disable-next-line no-unused-vars Icon, IconCloseCircle, IconConnectionActive, IconMessage, IconMicrophoneEmptySlash, IconMuteEveryoneElse, IconVideoOff @@ -159,14 +160,15 @@ export const ContextMenuMeetingParticipantDetails = ({ participant: p }: Props) { t('toolbar.accessibilityLabel.privateMessage') } - - - { t('participantsPane.actions.networkStats') } - + {/* We need design specs for this*/} + {/* */} + {/* */} + {/* { t('participantsPane.actions.networkStats') }*/} + {/* */} , - - /** - * Participant reference - */ - participant: Object + exclude: Array }; export const ContextMenuMore = ({ exclude }: Props) => { diff --git a/react/features/participants-pane/components/native/MeetingParticipantItem.js b/react/features/participants-pane/components/native/MeetingParticipantItem.js index 10bb4776a..1905b87a7 100644 --- a/react/features/participants-pane/components/native/MeetingParticipantItem.js +++ b/react/features/participants-pane/components/native/MeetingParticipantItem.js @@ -32,7 +32,7 @@ export const MeetingParticipantItem = ({ participant: p }: Props) => { audioMuteState = { isAudioMuted ? MediaState.Muted : MediaState.Unmuted } isKnockingParticipant = { false } name = { p.name } - onPress = { openContextMenuDetails } + onPress = { !p.local && openContextMenuDetails } participant = { p } videoMuteState = { isVideoMuted ? MediaState.Muted : MediaState.Unmuted } /> ); diff --git a/react/features/participants-pane/components/native/participants.js b/react/features/participants-pane/components/native/participants.js deleted file mode 100644 index 388f69bd3..000000000 --- a/react/features/participants-pane/components/native/participants.js +++ /dev/null @@ -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 - } -]; diff --git a/react/features/video-menu/components/native/VolumeSlider.js b/react/features/video-menu/components/native/VolumeSlider.js index aba412af0..a8571454a 100644 --- a/react/features/video-menu/components/native/VolumeSlider.js +++ b/react/features/video-menu/components/native/VolumeSlider.js @@ -1,7 +1,8 @@ // @flow +import Slider from '@react-native-community/slider'; import React, { Component } from 'react'; -import { Slider, View } from 'react-native'; +import { View } from 'react-native'; import { withTheme } from 'react-native-paper'; import { Icon, IconVolumeEmpty } from '../../../base/icons';