Skip to content

Commit 85636cc

Browse files
committed
Show end call button in states other than connected and ringback: it's perfectly valid to want to end the call at other times.
Fixes element-hq#9
1 parent 490e56b commit 85636cc

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

‎src/skins/vector/views/molecules/RoomHeader.js‎

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,12 @@ module.exports = React.createClass({
5353
var topic = this.props.room.currentState.getStateEvents('m.room.topic', '');
5454

5555
var callButtons;
56-
if (this.state) {
57-
switch (this.state.call_state) {
58-
case "ringback":
59-
case "connected":
60-
callButtons = (
61-
<div className="mx_RoomHeader_textButton" onClick={this.onHangupClick}>
62-
End call
63-
</div>
64-
);
65-
break;
66-
}
56+
if (this.state && this.state.call_state != 'ended') {
57+
callButtons = (
58+
<div className="mx_RoomHeader_textButton" onClick={this.onHangupClick}>
59+
End call
60+
</div>
61+
);
6762
}
6863

6964
var name = null;

0 commit comments

Comments
 (0)