Add another setState skip to prevent redundant state updates

pull/21833/head
Michael Telatynski 2021-06-16 12:11:17 +01:00
parent 626d575820
commit ab964339d2
1 changed files with 3 additions and 1 deletions

View File

@ -1640,7 +1640,9 @@ export default class RoomView extends React.Component<IProps, IState> {
// but it's better than the video going missing entirely
if (auxPanelMaxHeight < 50) auxPanelMaxHeight = 50;
this.setState({auxPanelMaxHeight: auxPanelMaxHeight});
if (this.state.auxPanelMaxHeight !== auxPanelMaxHeight) {
this.setState({ auxPanelMaxHeight });
}
};
private onStatusBarVisible = () => {