mirror of
https://github.com/element-hq/element-web
synced 2024-11-22 09:15:41 +03:00
Make room changing work
This commit is contained in:
parent
125fa78bc6
commit
0b0e6adce3
2 changed files with 11 additions and 0 deletions
|
@ -11,6 +11,12 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
componentWillReceiveProps: function(props) {
|
||||||
|
this.setState({
|
||||||
|
room: MatrixClientPeg.get().getRoom(props.room_id)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
getMessageTiles: function() {
|
getMessageTiles: function() {
|
||||||
return this.state.room.timeline.map(function(mxEv) {
|
return this.state.room.timeline.map(function(mxEv) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -39,6 +39,11 @@ module.exports = React.createClass({
|
||||||
ready: false
|
ready: false
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case 'view_room':
|
||||||
|
this.setState({
|
||||||
|
currentRoom: payload.room_id
|
||||||
|
});
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue