Don't break the room settings page

A later commit will make the URL preview settings behave like the rest of the settings page.

Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
Travis Ralston 2017-10-29 22:18:03 -06:00
parent c056f4faa6
commit 99ee58d13a

View file

@ -28,6 +28,11 @@ module.exports = React.createClass({
room: React.PropTypes.object, room: React.PropTypes.object,
}, },
saveSettings: function() {
// TODO: {Travis} move toggle logic here instead of being 'live'
return [];
},
render: function() { render: function() {
const SettingsCheckbox = sdk.getComponent("elements.SettingsCheckbox"); const SettingsCheckbox = sdk.getComponent("elements.SettingsCheckbox");
const roomId = this.props.room.roomId; const roomId = this.props.room.roomId;
@ -43,6 +48,7 @@ module.exports = React.createClass({
); );
} }
// TODO: {Travis} This needs to be an explicit true/false for "room" only.
let previewsForRoom = null; let previewsForRoom = null;
if (SettingsStore.canSetValue("urlPreviewsEnabled", roomId, "room")) { if (SettingsStore.canSetValue("urlPreviewsEnabled", roomId, "room")) {
previewsForRoom = ( previewsForRoom = (