Skip to content

Commit

Permalink
fixes for hidden clients
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindgamesnl committed Dec 1, 2024
1 parent 19a02ef commit 56ae37b
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions client/src/components/voice/ui/VoiceQuickSettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class VoiceQuickSettings extends React.Component {
{msg('vc.myStatus')}
</div>

<div className="grid grid-cols-3 gap-2 mt-2">
<div className={`grid gap-2 mt-2 ${!this.props.peersHidden ? 'grid-cols-3' : 'grid-cols-2'}`}>

<VoicePageButton
highlighted={this.props.voicechatMuted}
Expand All @@ -111,14 +111,16 @@ class VoiceQuickSettings extends React.Component {
<VoiceDeafenButtonContent deafened={this.props.voicechatDeafened} />
</VoicePageButton>

<VoicePageButton
highlighted={pipEnabled}
highlightGreen
isDisabled={!isPipSupported}
onClick={this.togglePiP}
>
<PipVector />
</VoicePageButton>
{!this.props.peersHidden ? (
<VoicePageButton
highlighted={pipEnabled}
highlightGreen
isDisabled={!isPipSupported}
onClick={this.togglePiP}
>
<PipVector />
</VoicePageButton>
) : null}
</div>

<div className="content-card-buttons mt-2 w-full">
Expand Down Expand Up @@ -151,7 +153,7 @@ class VoiceQuickSettings extends React.Component {
</div>
</div>

{this.props.voicePiPEnabled ? <DocumentPictureInPicture><VoiceChatPiP /></DocumentPictureInPicture> : null}
{(this.props.voicePiPEnabled && !this.props.peersHidden) ? <DocumentPictureInPicture><VoiceChatPiP /></DocumentPictureInPicture> : null}
</div>
);
}
Expand All @@ -169,5 +171,6 @@ function mapStateToProps(state) {
isMutedServerSide: state.voiceState.isMutedServerSide,
isSpeaking: state.voiceState.isSpeaking,
currentUser: state.currentUser,
peersHidden: state.voiceState.peersHidden,
};
}

0 comments on commit 56ae37b

Please sign in to comment.