avatar: render a special avatar if the user is sharing their screen

This commit is contained in:
Saúl Ibarra Corretgé 2019-08-06 15:10:17 +02:00 committed by Saúl Ibarra Corretgé
parent f3e7952e51
commit 149e53af76
1 changed files with 8 additions and 1 deletions

View File

@ -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
};
}