feat(video-avatar): hide icons when squeezed

This commit is contained in:
Max Franke 2022-05-24 17:20:29 -03:00
parent cd11c81499
commit 45d3738960
2 changed files with 14 additions and 2 deletions

View File

@ -127,6 +127,7 @@ const VideoListItem = (props) => {
user={user}
voiceUser={voiceUser}
unhealthyStream={shouldRenderReconnect}
squeezed={false}
/>
<Styled.BottomBar>
<UserActions
@ -154,6 +155,7 @@ const VideoListItem = (props) => {
<UserAvatarVideo
user={user}
unhealthyStream={shouldRenderReconnect}
squeezed
/>
{renderSqueezedButton()}
</Styled.WebcamConnecting>

View File

@ -5,9 +5,12 @@ import Icon from '/imports/ui/components/common/icon/component';
import UserListService from '/imports/ui/components/user-list/service';
const UserAvatarVideo = (props) => {
const { user, unhealthyStream } = props;
const { user, unhealthyStream, squeezed } = props;
const {
name, color, avatar, role, emoji, presenter, clientType,
name, color, avatar, role, emoji,
} = user;
let {
presenter, clientType,
} = user;
const ROLE_MODERATOR = Meteor.settings.public.user.role_moderator;
@ -19,6 +22,12 @@ const UserAvatarVideo = (props) => {
return name.toLowerCase().slice(0, 2);
};
// hide icons when squeezed
if (squeezed) {
presenter = false;
clientType = false;
}
return (
<Styled.UserAvatarStyled
moderator={role === ROLE_MODERATOR}
@ -47,4 +56,5 @@ UserAvatarVideo.propTypes = {
clientType: PropTypes.string.isRequired,
}).isRequired,
unhealthyStream: PropTypes.bool.isRequired,
squeezed: PropTypes.bool.isRequired,
};