From f8298b2482503d2bb522648d9b08d79ef23c1b16 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 16 Mar 2017 11:36:57 +0000 Subject: [PATCH] Fix the people section This does two things: - Fixes an incorrect import that was causing Direct Chat toggle to not be editable https://github.com/vector-im/riot-web/issues/3355 - Use props.list in RoomSubList when calculating whether to show IncomingCallDialog. Fixes https://github.com/vector-im/riot-web/issues/2956 --- src/components/structures/RoomSubList.js | 4 ++-- src/components/views/context_menus/RoomTileContextMenu.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index 67c47263a4..3aae164a19 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -417,7 +417,7 @@ var RoomSubList = React.createClass({ if (this.props.incomingCall) { var self = this; // Check if the incoming call is for this section - var incomingCallRoom = this.state.sortedList.filter(function(room) { + var incomingCallRoom = this.props.list.filter(function(room) { return self.props.incomingCall.roomId === room.roomId; }); @@ -507,7 +507,7 @@ var RoomSubList = React.createClass({ var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); console.error("Failed to add tag " + self.props.tagName + " to room" + err); Modal.createDialog(ErrorDialog, { - title: "Error", + title: "Error", description: "Failed to add tag " + self.props.tagName + " to room", }); }); diff --git a/src/components/views/context_menus/RoomTileContextMenu.js b/src/components/views/context_menus/RoomTileContextMenu.js index 0998194edc..289121f1d3 100644 --- a/src/components/views/context_menus/RoomTileContextMenu.js +++ b/src/components/views/context_menus/RoomTileContextMenu.js @@ -24,7 +24,7 @@ import sdk from 'matrix-react-sdk'; import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg'; import dis from 'matrix-react-sdk/lib/dispatcher'; import DMRoomMap from 'matrix-react-sdk/lib/utils/DMRoomMap'; -import Rooms from 'matrix-react-sdk/lib/Rooms'; +import * as Rooms from 'matrix-react-sdk/lib/Rooms'; import * as RoomNotifs from 'matrix-react-sdk/lib/RoomNotifs'; import Modal from 'matrix-react-sdk/lib/Modal';