From: Chocobozzz Date: Fri, 31 Aug 2018 11:46:56 +0000 (+0200) Subject: Delete highlighted comment too if needed X-Git-Tag: v1.0.0-beta.12~66 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=73dc4da09e99ce0f6deab33326c731cbcdb52ca1;p=oweals%2Fpeertube.git Delete highlighted comment too if needed --- 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)