mirror of
https://github.com/wassname/talk.git
synced 2026-10-02 12:50:49 +08:00
Stream container refetch then setCommentCountCache to asset.commentCount instead of silly zero
This commit is contained in:
1 parent
cfc6d4bfea
commit
aaa2da6c23
1 file changed
+3
-1
@@ -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