contains/Stream setCommentCountCache waits for refetch promise

This commit is contained in:
Benjamin Goering
2017-05-18 08:10:20 -07:00
parent 9eac05c8fb
commit 340d3cea62
@@ -112,8 +112,8 @@ class StreamContainer extends React.Component {
componentDidMount() {
if (this.props.previousTab) {
this.props.data.refetch();
this.props.setCommentCountCache(0);
this.props.data.refetch()
.then(() => this.props.setCommentCountCache(0));
}
this.countPoll = setInterval(() => {
this.getCounts(this.props.data.variables);