mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 20:38:55 +03:00
Listen for room deletions and refresh the room list when it happens
This commit is contained in:
parent
f7aa8be1c1
commit
e8f82527d1
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue