diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-31 13:46:56 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-31 13:46:56 +0200 |
commit | 73dc4da09e99ce0f6deab33326c731cbcdb52ca1 (patch) | |
tree | 83241c0888a8704ceb360d40fe0ad4ea78420731 /client/src | |
parent | b6314e3cee2ec9d9f7894fe057cfa7e9d0c50fbc (diff) | |
download | PeerTube-73dc4da09e99ce0f6deab33326c731cbcdb52ca1.tar.gz PeerTube-73dc4da09e99ce0f6deab33326c731cbcdb52ca1.tar.zst PeerTube-73dc4da09e99ce0f6deab33326c731cbcdb52ca1.zip |
Delete highlighted comment too if needed
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/app/videos/+video-watch/comment/video-comments.component.ts | 2 |
1 files changed, 2 insertions, 0 deletions
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 { | |||
148 | // Delete the thread | 148 | // Delete the thread |
149 | this.comments = this.comments.filter(c => c.id !== commentToDelete.id) | 149 | this.comments = this.comments.filter(c => c.id !== commentToDelete.id) |
150 | this.componentPagination.totalItems-- | 150 | this.componentPagination.totalItems-- |
151 | |||
152 | if (this.highlightedThread.id === commentToDelete.id) this.highlightedThread = undefined | ||
151 | }, | 153 | }, |
152 | 154 | ||
153 | err => this.notificationsService.error(this.i18n('Error'), err.message) | 155 | err => this.notificationsService.error(this.i18n('Error'), err.message) |