Delete highlighted comment too if needed
authorChocobozzz <me@florianbigard.com>
Fri, 31 Aug 2018 11:46:56 +0000 (13:46 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 31 Aug 2018 11:46:56 +0000 (13:46 +0200)
client/src/app/videos/+video-watch/comment/video-comments.component.ts

index 3743cd22807cb4f92b624c395c4f068c330c3b37..3707a40948d528294efda9d27b948b328f78d5f7 100644 (file)
@@ -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)