You've already forked matrix-react-sdk
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:
@@ -49,8 +49,12 @@ module.exports = React.createClass({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getInitialState: function() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
|
||||||
componentWillReceiveProps: function(newProps) {
|
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 topic = this.props.room.currentState.getStateEvents('m.room.topic', '');
|
||||||
var name = this.props.room.currentState.getStateEvents('m.room.name', '');
|
var name = this.props.room.currentState.getStateEvents('m.room.name', '');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user