position the inbound call box correctly, and fix various issues with when the video preview and callview are shown

This commit is contained in:
Matthew Hodgson 2015-12-17 02:53:53 +00:00
parent 856156ef5c
commit 1a90a2c426
4 changed files with 22 additions and 16 deletions

View file

@ -62,7 +62,7 @@ var LeftPanel = React.createClass({
// audio/video not crap out
var activeCall = CallHandler.getAnyActiveCall();
var callForRoom = CallHandler.getCallForRoom(selectedRoomId);
var showCall = (activeCall && !callForRoom);
var showCall = (activeCall && activeCall.call_state === 'connected' && !callForRoom);
this.setState({
showCallElement: showCall
});
@ -87,7 +87,6 @@ var LeftPanel = React.createClass({
render: function() {
var RoomList = sdk.getComponent('rooms.RoomList');
var BottomLeftMenu = sdk.getComponent('structures.BottomLeftMenu');
var IncomingCallBox = sdk.getComponent('voip.IncomingCallBox');
var collapseButton;
var classes = "mx_LeftPanel";
@ -100,7 +99,7 @@ var LeftPanel = React.createClass({
}
var callPreview;
if (this.state.showCallElement) {
if (this.state.showCallElement && !this.props.collapsed) {
var CallView = sdk.getComponent('voip.CallView');
callPreview = (
<CallView
@ -112,7 +111,6 @@ var LeftPanel = React.createClass({
return (
<aside className={classes}>
{ collapseButton }
<IncomingCallBox />
{ callPreview }
<RoomList
selectedRoom={this.props.selectedRoom}