From cde3f33db39af2ccba4ca68bfaab624e35b1f7df Mon Sep 17 00:00:00 2001 From: wmwragg Date: Thu, 15 Sep 2016 14:37:53 +0100 Subject: [PATCH 1/2] Added incomingCallBox to header and removed from roomTile --- src/components/structures/RoomSubList.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index 224ff2c635..16491d499f 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -383,7 +383,7 @@ var RoomSubList = React.createClass({ highlight={ room.getUnreadNotificationCount('highlight') > 0 || self.props.label === 'Invites' } isInvite={ self.props.label === 'Invites' } refreshSubList={ self._updateSubListCount } - incomingCall={ self.props.incomingCall && (self.props.incomingCall.roomId === room.roomId) ? self.props.incomingCall : null } /> + incomingCall={ null } /> ); }); }, @@ -428,6 +428,20 @@ var RoomSubList = React.createClass({ } } + var incomingCall; + if (this.props.incomingCall) { + var self = this; + // Check if the incoming call is for this section + var incomingCallRoom = this.state.sortedList.filter(function(room) { + return self.props.incomingCall.roomId === room.roomId; + }); + + if (incomingCallRoom.length === 1) { + var IncomingCallBox = sdk.getComponent("voip.IncomingCallBox"); + incomingCall = ; + } + } + return (
@@ -436,6 +450,7 @@ var RoomSubList = React.createClass({
{badge}
+ { incomingCall }
); }, From 5ceb1e641f3db70beaad55a8b6534a611544de12 Mon Sep 17 00:00:00 2001 From: wmwragg Date: Thu, 15 Sep 2016 15:34:11 +0100 Subject: [PATCH 2/2] Placing the incomingCallBox in the sticky element, so it sticks when the header sticks --- src/components/structures/RoomSubList.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index 16491d499f..7684b344e6 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -446,11 +446,11 @@ var RoomSubList = React.createClass({
{ this.props.collapsed ? '' : this.props.label } -
{roomCount}
+
{ roomCount }
- {badge} + { badge } + { incomingCall }
- { incomingCall }
); },