Factor out separate RoomNameEditor and RoomTopicEditor components
This commit is contained in:
parent
70133ae661
commit
6422f7ecc8
5 changed files with 160 additions and 68 deletions
|
@ -858,8 +858,14 @@ module.exports = React.createClass({
|
|||
uploadingRoomSettings: true,
|
||||
});
|
||||
|
||||
this.refs.room_settings.setName(this.refs.header.getRoomName());
|
||||
this.refs.room_settings.setTopic(this.refs.header.getTopic());
|
||||
var newName = this.refs.header.getEditedName();
|
||||
if (newName !== undefined) {
|
||||
this.refs.room_settings.setName(newName);
|
||||
}
|
||||
var newTopic = this.refs.header.getEditedTopic();
|
||||
if (newTopic !== undefined) {
|
||||
this.refs.room_settings.setTopic(newTopic);
|
||||
}
|
||||
|
||||
this.refs.room_settings.save().then((results) => {
|
||||
var fails = results.filter(function(result) { return result.state !== "fulfilled" });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue