From 73dc4da09e99ce0f6deab33326c731cbcdb52ca1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 31 Aug 2018 13:46:56 +0200 Subject: Delete highlighted comment too if needed --- client/src/app/videos/+video-watch/comment/video-comments.component.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'client/src/app/videos') 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 3743cd228..3707a4094 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 @@ -148,6 +148,8 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { // Delete the thread this.comments = this.comments.filter(c => c.id !== commentToDelete.id) this.componentPagination.totalItems-- + + if (this.highlightedThread.id === commentToDelete.id) this.highlightedThread = undefined }, err => this.notificationsService.error(this.i18n('Error'), err.message) -- cgit v1.2.3