You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Don't assume false means "use state"
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
@@ -763,9 +763,9 @@ module.exports = React.createClass({
|
|||||||
return (
|
return (
|
||||||
<div className="mx_UserSettings_toggle" key={setting.id}>
|
<div className="mx_UserSettings_toggle" key={setting.id}>
|
||||||
<SettingsFlag name={setting.id}
|
<SettingsFlag name={setting.id}
|
||||||
label={setting.label}
|
label={setting.label}
|
||||||
level={SettingLevel.DEVICE}
|
level={SettingLevel.DEVICE}
|
||||||
onChange={setting.fn} />
|
onChange={setting.fn} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -54,12 +54,12 @@ module.exports = React.createClass({
|
|||||||
if (this.props.onChange) this.props.onChange(newState);
|
if (this.props.onChange) this.props.onChange(newState);
|
||||||
},
|
},
|
||||||
|
|
||||||
save: function(val = null) {
|
save: function(val = undefined) {
|
||||||
return SettingsStore.setValue(
|
return SettingsStore.setValue(
|
||||||
this.props.name,
|
this.props.name,
|
||||||
this.props.roomId,
|
this.props.roomId,
|
||||||
this.props.level,
|
this.props.level,
|
||||||
val ? val : this.state.value
|
val !== undefined ? val : this.state.value
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user