call onWidgetLoad on componentDidUpdate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
fdf63fd440
commit
ca766df598
1 changed files with 7 additions and 3 deletions
|
@ -65,6 +65,10 @@ export default class ReplyThread extends React.Component {
|
||||||
this.initialize();
|
this.initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidUpdate() {
|
||||||
|
this.props.onWidgetLoad();
|
||||||
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
this.unmounted = true;
|
this.unmounted = true;
|
||||||
}
|
}
|
||||||
|
@ -105,7 +109,7 @@ export default class ReplyThread extends React.Component {
|
||||||
if (!inReplyTo) {
|
if (!inReplyTo) {
|
||||||
this.setState({
|
this.setState({
|
||||||
loading: false,
|
loading: false,
|
||||||
}, this.props.onWidgetLoad);
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,9 +117,9 @@ export default class ReplyThread extends React.Component {
|
||||||
if (this.unmounted) return;
|
if (this.unmounted) return;
|
||||||
|
|
||||||
if (loadedEv) {
|
if (loadedEv) {
|
||||||
this.setState({loadedEv}, this.props.onWidgetLoad);
|
this.setState({loadedEv});
|
||||||
} else {
|
} else {
|
||||||
this.setState({err: true}, this.props.onWidgetLoad);
|
this.setState({err: true});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue