PLT-564 removing auto-hide from error bar

Этот коммит содержится в:
=Corey Hulen
2015-10-26 10:42:54 -07:00
родитель b662874519
Коммит 6d957a26d8

Просмотреть файл

@@ -9,12 +9,8 @@ export default class ErrorBar extends React.Component {
this.onErrorChange = this.onErrorChange.bind(this); this.onErrorChange = this.onErrorChange.bind(this);
this.handleClose = this.handleClose.bind(this); this.handleClose = this.handleClose.bind(this);
this.prevTimer = null;
this.state = ErrorStore.getLastError(); this.state = ErrorStore.getLastError();
if (this.isValidError(this.state)) {
this.prevTimer = setTimeout(this.handleClose, 10000);
}
} }
isValidError(s) { isValidError(s) {
@@ -56,16 +52,8 @@ export default class ErrorBar extends React.Component {
onErrorChange() { onErrorChange() {
var newState = ErrorStore.getLastError(); var newState = ErrorStore.getLastError();
if (this.prevTimer != null) {
clearInterval(this.prevTimer);
this.prevTimer = null;
}
if (newState) { if (newState) {
this.setState(newState); this.setState(newState);
if (!this.isConnectionError(newState)) {
this.prevTimer = setTimeout(this.handleClose, 10000);
}
} else { } else {
this.setState({message: null}); this.setState({message: null});
} }