Fix a number of minor code quality issues

Most of these are complaints from my IDE. Discovered by going through nearly every file looking for React warnings.
This commit is contained in:
Travis Ralston 2020-03-31 14:05:56 -06:00
parent 56dda3895c
commit c86d75693b
11 changed files with 12 additions and 18 deletions

View file

@ -79,7 +79,7 @@ export default createReactClass({
},
onDeviceVerificationChanged: function(userId, device) {
if (userId == this.props.event.getSender()) {
if (userId === this.props.event.getSender()) {
this.refreshDevice().then((dev) => {
this.setState({ device: dev });
});

View file

@ -30,7 +30,7 @@ import EventIndexPeg from "../../../../indexing/EventIndexPeg";
export default class ManageEventIndexDialog extends React.Component {
static propTypes = {
onFinished: PropTypes.func.isRequired,
}
};
constructor(props) {
super(props);
@ -126,16 +126,12 @@ export default class ManageEventIndexDialog extends React.Component {
import("./DisableEventIndexDialog"),
null, null, /* priority = */ false, /* static = */ true,
);
}
_onDone = () => {
this.props.onFinished(true);
}
};
_onCrawlerSleepTimeChange = (e) => {
this.setState({crawlerSleepTime: e.target.value});
SettingsStore.setValue("crawlerSleepTime", null, SettingLevel.DEVICE, e.target.value);
}
};
render() {
let crawlerState;