From 85636ccdadf4b0b269b723abbffe92ee39e676de Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 5 Oct 2015 16:29:07 +0100 Subject: [PATCH] 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 #9 --- src/skins/vector/views/molecules/RoomHeader.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/skins/vector/views/molecules/RoomHeader.js b/src/skins/vector/views/molecules/RoomHeader.js index f7d3fe7e59..fc097d399b 100644 --- a/src/skins/vector/views/molecules/RoomHeader.js +++ b/src/skins/vector/views/molecules/RoomHeader.js @@ -53,17 +53,12 @@ module.exports = React.createClass({ var topic = this.props.room.currentState.getStateEvents('m.room.topic', ''); var callButtons; - if (this.state) { - switch (this.state.call_state) { - case "ringback": - case "connected": - callButtons = ( -
- End call -
- ); - break; - } + if (this.state && this.state.call_state != 'ended') { + callButtons = ( +
+ End call +
+ ); } var name = null;