|
@@ -30,6 +30,11 @@ type Props = {
|
30
|
30
|
*/
|
31
|
31
|
children?: Node,
|
32
|
32
|
|
|
33
|
+ /**
|
|
34
|
+ * The name of the participant. Used for showing lobby names.
|
|
35
|
+ */
|
|
36
|
+ name?: string,
|
|
37
|
+
|
33
|
38
|
/**
|
34
|
39
|
* Callback for when the mouse leaves this component
|
35
|
40
|
*/
|
|
@@ -52,13 +57,14 @@ type Props = {
|
52
|
57
|
* @returns {React$Element<any>}
|
53
|
58
|
*/
|
54
|
59
|
function ParticipantItem({
|
55
|
|
- children,
|
56
|
60
|
audioMuteState = MediaState.None,
|
57
|
|
- videoMuteState = MediaState.None,
|
58
|
|
- participant: p
|
|
61
|
+ children,
|
|
62
|
+ name,
|
|
63
|
+ participant: p,
|
|
64
|
+ videoMuteState = MediaState.None
|
59
|
65
|
}: Props) {
|
|
66
|
+ const displayName = name || useSelector(getParticipantDisplayNameWithId(p.id));
|
60
|
67
|
const { t } = useTranslation();
|
61
|
|
- const name = useSelector(getParticipantDisplayNameWithId(p.id));
|
62
|
68
|
|
63
|
69
|
return (
|
64
|
70
|
<View style = { styles.participantContainer } >
|
|
@@ -69,7 +75,7 @@ function ParticipantItem({
|
69
|
75
|
<View style = { styles.participantContent }>
|
70
|
76
|
<View style = { styles.participantNameContainer }>
|
71
|
77
|
<Text style = { styles.participantName }>
|
72
|
|
- { name }
|
|
78
|
+ { displayName }
|
73
|
79
|
</Text>
|
74
|
80
|
{ p.local ? <Text style = { styles.isLocal }>({t('chat.you')})</Text> : null }
|
75
|
81
|
</View>
|