diff --git a/skins/base/views/molecules/RoomHeader.js b/skins/base/views/molecules/RoomHeader.js index 33d43302c3..7d8cc97e54 100644 --- a/skins/base/views/molecules/RoomHeader.js +++ b/skins/base/views/molecules/RoomHeader.js @@ -59,7 +59,7 @@ module.exports = React.createClass({
- +
{ topic }
diff --git a/skins/base/views/organisms/UserSettings.js b/skins/base/views/organisms/UserSettings.js index 5bce0a036e..7bc6b0feb2 100644 --- a/skins/base/views/organisms/UserSettings.js +++ b/skins/base/views/organisms/UserSettings.js @@ -64,7 +64,7 @@ module.exports = React.createClass({
- +
Edit
diff --git a/src/controllers/atoms/EditableText.js b/src/controllers/atoms/EditableText.js index d9155a5cb9..4d9eb01016 100644 --- a/src/controllers/atoms/EditableText.js +++ b/src/controllers/atoms/EditableText.js @@ -21,7 +21,7 @@ var React = require('react'); module.exports = { propTypes: { onValueChanged: React.PropTypes.func, - initalValue: React.PropTypes.string, + initialValue: React.PropTypes.string, placeHolder: React.PropTypes.string, }, @@ -33,18 +33,24 @@ module.exports = { getDefaultProps: function() { return { onValueChanged: function() {}, - initalValue: '', + initialValue: '', placeHolder: 'Click to set', }; }, getInitialState: function() { return { - value: this.props.initalValue, + value: this.props.initialValue, phase: this.Phases.Display, } }, + componentWillReceiveProps: function(nextProps) { + this.setState({ + value: nextProps.initialValue + }); + }, + getValue: function() { return this.state.value; }, diff --git a/src/controllers/organisms/RoomView.js b/src/controllers/organisms/RoomView.js index f1a26ee4dc..339ed6fc28 100644 --- a/src/controllers/organisms/RoomView.js +++ b/src/controllers/organisms/RoomView.js @@ -49,6 +49,7 @@ module.exports = { componentWillMount: function() { this.dispatcherRef = dis.register(this.onAction); MatrixClientPeg.get().on("Room.timeline", this.onRoomTimeline); + MatrixClientPeg.get().on("Room.name", this.onRoomName); this.atBottom = true; }, @@ -60,6 +61,7 @@ module.exports = { dis.unregister(this.dispatcherRef); if (MatrixClientPeg.get()) { MatrixClientPeg.get().removeListener("Room.timeline", this.onRoomTimeline); + MatrixClientPeg.get().removeListener("Room.name", this.onRoomName); } }, @@ -106,6 +108,14 @@ module.exports = { } }, + onRoomName: function(room) { + if (room.roomId == this.props.roomId) { + this.setState({ + room: room + }); + } + }, + componentDidMount: function() { if (this.refs.messageWrapper) { var messageWrapper = this.refs.messageWrapper.getDOMNode();