]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-watch/comment/video-comments.component.ts
Delete highlighted comment too if needed
[github/Chocobozzz/PeerTube.git] / 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)