From 743f79a9a7475aa1d655adbfcda233e58cb00489 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 18 Jul 2016 15:22:08 +0100 Subject: [PATCH 1/2] Fix unpublishing room in room settings Fixes https://github.com/vector-im/vector-web/issues/1743 --- src/components/views/rooms/RoomSettings.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomSettings.js b/src/components/views/rooms/RoomSettings.js index 1f50a9241b..8f1a2cd141 100644 --- a/src/components/views/rooms/RoomSettings.js +++ b/src/components/views/rooms/RoomSettings.js @@ -65,7 +65,12 @@ module.exports = React.createClass({ tags_changed: false, tags: tags, areNotifsMuted: areNotifsMuted, - isRoomPublished: false, // loaded async in componentWillMount + // isRoomPublished is loaded async in componentWillMount so when the component + // inits, the saved value will always be undefined, however getInitialState() + // is also called from the saving code so we must return the correct value here + // if we have it (although this could race if the user saves before we load whether + // the room is oublisherd or not. + isRoomPublished: this._originalIsRoomPublished, }; }, From ffaf7f44f3a716e656f93b90285b737e2759d839 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 18 Jul 2016 15:36:19 +0100 Subject: [PATCH 2/2] typos --- src/components/views/rooms/RoomSettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomSettings.js b/src/components/views/rooms/RoomSettings.js index 8f1a2cd141..df30b63c75 100644 --- a/src/components/views/rooms/RoomSettings.js +++ b/src/components/views/rooms/RoomSettings.js @@ -69,7 +69,7 @@ module.exports = React.createClass({ // inits, the saved value will always be undefined, however getInitialState() // is also called from the saving code so we must return the correct value here // if we have it (although this could race if the user saves before we load whether - // the room is oublisherd or not. + // the room is published or not). isRoomPublished: this._originalIsRoomPublished, }; },