From 149e53af76d881be186ccf8020e58aed7b3afd0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Tue, 6 Aug 2019 15:10:17 +0200 Subject: [PATCH] avatar: render a special avatar if the user is sharing their screen --- react/features/base/avatar/components/Avatar.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/react/features/base/avatar/components/Avatar.js b/react/features/base/avatar/components/Avatar.js index 9c36a61cf..d87e2d772 100644 --- a/react/features/base/avatar/components/Avatar.js +++ b/react/features/base/avatar/components/Avatar.js @@ -178,10 +178,17 @@ export function _mapStateToProps(state: Object, ownProps: Props) { const { colorBase, displayName, participantId } = ownProps; const _participant = participantId && getParticipantById(state, participantId); const _initialsBase = (_participant && _participant.name) || displayName; + const screenShares = state['features/video-layout'].screenShares || []; + + let _loadableAvatarUrl = _participant && _participant.loadableAvatarUrl; + + if (participantId && screenShares.includes(participantId)) { + _loadableAvatarUrl = 'icon://share-desktop'; + } return { _initialsBase, - _loadableAvatarUrl: _participant && _participant.loadableAvatarUrl, + _loadableAvatarUrl, colorBase: !colorBase && _participant ? _participant.id : colorBase }; }