Переглянути джерело

fix(participants): Knocking participant name in participants list

Fixes https://github.com/jitsi/jitsi-meet/issues/9211
j8
Vlad Piersec 4 роки тому
джерело
коміт
3f7073c589

+ 1
- 0
react/features/participants-pane/components/LobbyParticipantItem.js Переглянути файл

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

+ 8
- 2
react/features/participants-pane/components/ParticipantItem.js Переглянути файл

@@ -100,6 +100,11 @@ type Props = {
100 100
      */
101 101
     isHighlighted?: boolean,
102 102
 
103
+    /**
104
+     * The name of the participant. Used for showing lobby names.
105
+     */
106
+    name?: string,
107
+
103 108
     /**
104 109
      * Callback for when the mouse leaves this component
105 110
      */
@@ -123,11 +128,12 @@ export const ParticipantItem = ({
123 128
     actionsTrigger = ActionTrigger.Hover,
124 129
     audioMuteState = MediaState.None,
125 130
     videoMuteState = MediaState.None,
131
+    name,
126 132
     participant: p
127 133
 }: Props) => {
128 134
     const ParticipantActions = Actions[actionsTrigger];
129 135
     const { t } = useTranslation();
130
-    const name = useSelector(getParticipantDisplayNameWithId(p.id));
136
+    const displayName = name || useSelector(getParticipantDisplayNameWithId(p.id));
131 137
 
132 138
     return (
133 139
         <ParticipantContainer
@@ -141,7 +147,7 @@ export const ParticipantItem = ({
141 147
             <ParticipantContent>
142 148
                 <ParticipantNameContainer>
143 149
                     <ParticipantName>
144
-                        { name }
150
+                        { displayName }
145 151
                     </ParticipantName>
146 152
                     { p.local ? <span>&nbsp;({t('chat.you')})</span> : null }
147 153
                 </ParticipantNameContainer>

Завантаження…
Відмінити
Зберегти