Added support for new commentCount

This commit is contained in:
Wyatt Johnson
2017-01-27 15:52:05 -07:00
parent 2e6c7f7b09
commit 04cd7312a6
4 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ class Embed extends Component {
loading ? <Spinner/>
: <div className="commentStream">
<TabBar onChange={this.changeTab} activeTab={activeTab}>
<Tab><Count count={asset.comments.length}/></Tab>
<Tab><Count count={asset.commentCount}/></Tab>
<Tab>Settings</Tab>
<Tab restricted={!isAdmin}>Configure Stream</Tab>
</TabBar>
@@ -17,6 +17,7 @@ query AssetQuery($asset_url: String!) {
charCount
requireEmailConfirmation
}
commentCount
comments {
...commentView
replies {
+1
View File
@@ -73,6 +73,7 @@ query AssetQuery($asset_id: ID!) {
id
title
url
commentCount
comments {
...commentView
replies {
+1 -1
View File
@@ -72,9 +72,9 @@ class SharedCacheDataLoader extends DataLoader {
constructor(prefix, expiry, batchLoadFn, options) {
super(SharedCacheDataLoader.batchLoadFn(prefix, expiry, batchLoadFn), options);
this._keyFunc = SharedCacheDataLoader.keyFunc(this._prefix);
this._prefix = prefix;
this._expiry = expiry;
this._keyFunc = SharedCacheDataLoader.keyFunc(this._prefix);
}
/**