fix(rn,display-name) don't show display name for local user

In large view. This aligns the behavior with the web.
This commit is contained in:
Saúl Ibarra Corretgé 2022-02-22 15:57:11 +01:00 committed by GitHub
parent e0881502d3
commit 0826ec16c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 10 deletions

View File

@ -71,18 +71,10 @@ class DisplayNameLabel extends Component<Props> {
function _mapStateToProps(state: Object, ownProps: Props) { function _mapStateToProps(state: Object, ownProps: Props) {
const { participantId } = ownProps; const { participantId } = ownProps;
const participant = getParticipantById(state, participantId); const participant = getParticipantById(state, participantId);
const isFakeParticipant = participant && participant.isFakeParticipant;
// Currently we only render the display name if it's not the local
// participant and there is no video rendered for
// them.
const _render = Boolean(participantId)
&& !isFakeParticipant;
return { return {
_participantName: _participantName: getParticipantDisplayName(state, participantId),
getParticipantDisplayName(state, participantId), _render: participant && !participant?.local && !participant?.isFakeParticipant
_render
}; };
} }