Delete highlighted comment too if needed

pull/965/merge
Chocobozzz 2018-08-31 13:46:56 +02:00
parent b6314e3cee
commit 73dc4da09e
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 0 deletions

View 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)