From c7a28491cabe1f549b1c6578604b9f6ca0e43f24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Tue, 20 Jul 2021 16:58:44 +0200 Subject: [PATCH] Correct sidebar toggle behaviour MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/voip/CallView.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index 532eed9f86..32a5ff0a85 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -337,7 +337,11 @@ export default class CallView extends React.Component { 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 { }; 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, }); };