fix(participants): Knocking participant name in participants list

Fixes https://github.com/jitsi/jitsi-meet/issues/9211
This commit is contained in:
Vlad Piersec 2021-05-17 11:10:17 +03:00 committed by vp8x8
parent 2a37f7caa8
commit 3f7073c589
2 changed files with 9 additions and 2 deletions

View File

@ -28,6 +28,7 @@ export const LobbyParticipantItem = ({ participant: p }: Props) => {
<ParticipantItem
actionsTrigger = { ActionTrigger.Permanent }
audioMuteState = { MediaState.None }
name = { p.name }
participant = { p }
videoMuteState = { MediaState.None }>
<ParticipantActionButton

View File

@ -100,6 +100,11 @@ type Props = {
*/
isHighlighted?: boolean,
/**
* The name of the participant. Used for showing lobby names.
*/
name?: string,
/**
* Callback for when the mouse leaves this component
*/
@ -123,11 +128,12 @@ export const ParticipantItem = ({
actionsTrigger = ActionTrigger.Hover,
audioMuteState = MediaState.None,
videoMuteState = MediaState.None,
name,
participant: p
}: Props) => {
const ParticipantActions = Actions[actionsTrigger];
const { t } = useTranslation();
const name = useSelector(getParticipantDisplayNameWithId(p.id));
const displayName = name || useSelector(getParticipantDisplayNameWithId(p.id));
return (
<ParticipantContainer
@ -141,7 +147,7 @@ export const ParticipantItem = ({
<ParticipantContent>
<ParticipantNameContainer>
<ParticipantName>
{ name }
{ displayName }
</ParticipantName>
{ p.local ? <span>&nbsp;({t('chat.you')})</span> : null }
</ParticipantNameContainer>