From 19b163d045750fe06ce04f601628d12085783d7b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 10 Dec 2020 10:22:27 +0100 Subject: Fix comments count --- .../src/app/+videos/+video-watch/comment/video-comments.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'client/src/app') diff --git a/client/src/app/+videos/+video-watch/comment/video-comments.component.ts b/client/src/app/+videos/+video-watch/comment/video-comments.component.ts index a4c651da5..f83a73ccd 100644 --- a/client/src/app/+videos/+video-watch/comment/video-comments.component.ts +++ b/client/src/app/+videos/+video-watch/comment/video-comments.component.ts @@ -5,6 +5,7 @@ import { AuthService, ComponentPagination, ConfirmService, hasMoreItems, Notifie import { HooksService } from '@app/core/plugins/hooks.service' import { Syndication, VideoDetails } from '@app/shared/shared-main' import { VideoComment, VideoCommentService, VideoCommentThreadTree } from '@app/shared/shared-video-comment' +import { ThisReceiver } from '@angular/compiler' @Component({ selector: 'my-video-comments', @@ -121,7 +122,8 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { obs.subscribe( res => { this.comments = this.comments.concat(res.data) - this.componentPagination.totalItems = res.total + // Client does not display removed comments + this.componentPagination.totalItems = res.total - this.comments.filter(c => c.isDeleted).length this.onDataSubject.next(res.data) this.hooks.runAction('action:video-watch.video-threads.loaded', 'video-watch', { data: this.componentPagination }) -- cgit v1.2.3