1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-10 09:22:25 +03:00

don't reset RoomHeader every time the props change due to RoomView re-rendering during edits

This commit is contained in:
Matthew Hodgson
2016-03-18 19:16:55 +00:00
parent 12db0d9130
commit 86807b631d

View File

@@ -49,8 +49,12 @@ module.exports = React.createClass({
};
},
getInitialState: function() {
return {};
},
componentWillReceiveProps: function(newProps) {
if (newProps.editing) {
if (this.props.room !== newProps.room && newProps.editing) {
var topic = this.props.room.currentState.getStateEvents('m.room.topic', '');
var name = this.props.room.currentState.getStateEvents('m.room.name', '');