From e8f82527d1435e821ceaa284fd1bac1367bb1f18 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Wed, 16 Dec 2015 16:27:46 +0000 Subject: [PATCH] Listen for room deletions and refresh the room list when it happens --- src/components/views/rooms/RoomList.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index c48ed5880f..f7dd48d871 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -45,6 +45,7 @@ module.exports = React.createClass({ componentWillMount: function() { var cli = MatrixClientPeg.get(); cli.on("Room", this.onRoom); + cli.on("deleteRoom", this.onDeleteRoom); cli.on("Room.timeline", this.onRoomTimeline); cli.on("Room.name", this.onRoomName); cli.on("Room.tags", this.onRoomTags); @@ -91,6 +92,10 @@ module.exports = React.createClass({ this.refreshRoomList(); }, + onDeleteRoom: function(roomId) { + this.refreshRoomList(); + }, + onRoomTimeline: function(ev, room, toStartOfTimeline) { if (toStartOfTimeline) return;