Make ChangeAvatar support room avatars and tweak RoomAvatar respond to componentWillReceiveProps

This commit is contained in:
David Baker 2015-10-23 17:34:11 +01:00
parent 03dfd57a79
commit 5a760b71d0
3 changed files with 31 additions and 5 deletions

View file

@ -28,6 +28,7 @@ module.exports = {
cli.on("Room", this.onRoom);
cli.on("Room.timeline", this.onRoomTimeline);
cli.on("Room.name", this.onRoomName);
cli.on("RoomState.events", this.onRoomStateEvents);
var rooms = this.getRoomList();
this.setState({
@ -84,6 +85,10 @@ module.exports = {
this.refreshRoomList();
},
onRoomStateEvents: function(ev, state) {
this.refreshRoomList();
},
refreshRoomList: function() {
var rooms = this.getRoomList();
this.setState({