mirror of
https://github.com/wassname/talk.git
synced 2026-07-04 11:21:48 +08:00
Stream container refetch then setCommentCountCache to asset.commentCount instead of silly zero
This commit is contained in:
@@ -113,7 +113,9 @@ class StreamContainer extends React.Component {
|
||||
componentDidMount() {
|
||||
if (this.props.previousTab) {
|
||||
this.props.data.refetch()
|
||||
.then(() => this.props.setCommentCountCache(0));
|
||||
.then(({data: {asset: {commentCount}}}) => {
|
||||
return this.props.setCommentCountCache(commentCount);
|
||||
});
|
||||
}
|
||||
this.countPoll = setInterval(() => {
|
||||
this.getCounts(this.props.data.variables);
|
||||
|
||||
Reference in New Issue
Block a user