Browse Source

Make room changing work

pull/1/head
David Baker 7 years ago
parent
commit
0b0e6adce3
  1. 6
      src/organisms/RoomView.js
  2. 5
      src/pages/MatrixChat.js

6
src/organisms/RoomView.js

@ -11,6 +11,12 @@ module.exports = React.createClass({
}
},
componentWillReceiveProps: function(props) {
this.setState({
room: MatrixClientPeg.get().getRoom(props.room_id)
});
},
getMessageTiles: function() {
return this.state.room.timeline.map(function(mxEv) {
return (

5
src/pages/MatrixChat.js

@ -39,6 +39,11 @@ module.exports = React.createClass({
ready: false
});
break;
case 'view_room':
this.setState({
currentRoom: payload.room_id
});
break;
}
},

Loading…
Cancel
Save