Correct sidebar toggle behaviour

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-07-20 16:58:44 +02:00
parent 0af64504b1
commit c7a28491ca
No known key found for this signature in database
GPG Key ID: 55C211A1226CB17D
1 changed files with 5 additions and 7 deletions

View File

@ -337,7 +337,11 @@ export default class CallView extends React.Component<IProps, IState> {
return source;
},
);
this.setState({ screensharing: isScreensharing });
this.setState({
sidebarShown: true,
screensharing: isScreensharing,
});
};
private onMoreClick = (): void => {
@ -434,13 +438,7 @@ export default class CallView extends React.Component<IProps, IState> {
};
private onToggleSidebar = (): void => {
let vidMuted = this.state.vidMuted;
if (this.state.screensharing) {
vidMuted = this.state.sidebarShown;
this.props.call.setLocalVideoMuted(vidMuted);
}
this.setState({
vidMuted: vidMuted,
sidebarShown: !this.state.sidebarShown,
});
};