mirror of
https://github.com/wassname/talk.git
synced 2026-09-10 12:43:11 +08:00
Remove subscription code
This commit is contained in:
@@ -38,7 +38,7 @@ function prepareNotificationText(text) {
|
||||
class ModerationContainer extends Component {
|
||||
subscriptions = [];
|
||||
|
||||
get activeTab() {
|
||||
get activeTab() {
|
||||
|
||||
const {root: {asset, settings}, router, route} = this.props;
|
||||
|
||||
@@ -47,7 +47,7 @@ class ModerationContainer extends Component {
|
||||
|
||||
const queue = isPremod(premod) ? 'premod' : 'new';
|
||||
const activeTab = route.path && route.path !== ':id' ? route.path : queue;
|
||||
|
||||
|
||||
return activeTab;
|
||||
}
|
||||
|
||||
@@ -115,21 +115,7 @@ class ModerationContainer extends Component {
|
||||
},
|
||||
});
|
||||
|
||||
const sub5 = this.props.data.subscribeToMore({
|
||||
document: COMMENT_FEATURED_SUBSCRIPTION,
|
||||
variables,
|
||||
updateQuery: (prev, {subscriptionData: {data: {commentFeatured: comment}}}) => {
|
||||
const sort = this.props.moderation.sortOrder;
|
||||
const notify = {
|
||||
activeQueue: this.activeTab,
|
||||
text: 'New Featured Comment',
|
||||
anyQueue: true,
|
||||
};
|
||||
return handleCommentChange(prev, comment, sort, notify);
|
||||
},
|
||||
});
|
||||
|
||||
this.subscriptions.push(sub1, sub2, sub3, sub4, sub5);
|
||||
this.subscriptions.push(sub1, sub2, sub3, sub4);
|
||||
}
|
||||
|
||||
unsubscribe() {
|
||||
@@ -248,15 +234,6 @@ class ModerationContainer extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
const COMMENT_FEATURED_SUBSCRIPTION = gql`
|
||||
subscription CommentFeatured($asset_id: ID){
|
||||
commentFeatured(asset_id: $asset_id){
|
||||
...${getDefinitionName(Comment.fragments.comment)}
|
||||
}
|
||||
}
|
||||
${Comment.fragments.comment}
|
||||
`;
|
||||
|
||||
const COMMENT_EDITED_SUBSCRIPTION = gql`
|
||||
subscription CommentEdited($asset_id: ID){
|
||||
commentEdited(asset_id: $asset_id){
|
||||
|
||||
Reference in New Issue
Block a user