Added incomingCallBox to header and removed from roomTile
This commit is contained in:
parent
f95a74951e
commit
45f17eb973
3 changed files with 50 additions and 36 deletions
|
@ -21,6 +21,10 @@ var CallHandler = require("../../../CallHandler");
|
|||
module.exports = React.createClass({
|
||||
displayName: 'IncomingCallBox',
|
||||
|
||||
propTypes: {
|
||||
incomingCall: React.PropTypes.object,
|
||||
},
|
||||
|
||||
onAnswerClick: function() {
|
||||
dis.dispatch({
|
||||
action: 'answer',
|
||||
|
@ -36,9 +40,13 @@ module.exports = React.createClass({
|
|||
},
|
||||
|
||||
render: function() {
|
||||
var room = null;
|
||||
if (this.props.incomingCall) {
|
||||
room = MatrixClientPeg.get().getRoom(this.props.incomingCall.roomId);
|
||||
}
|
||||
|
||||
var room = this.props.incomingCall ? MatrixClientPeg.get().getRoom(this.props.incomingCall.roomId) : null;
|
||||
var caller = room ? room.name : "unknown";
|
||||
|
||||
return (
|
||||
<div className="mx_IncomingCallBox" id="incomingCallBox">
|
||||
<img className="mx_IncomingCallBox_chevron" src="img/chevron-left.png" width="9" height="16" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue