aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-31 13:46:56 +0200
committerChocobozzz <me@florianbigard.com>2018-08-31 13:46:56 +0200
commit73dc4da09e99ce0f6deab33326c731cbcdb52ca1 (patch)
tree83241c0888a8704ceb360d40fe0ad4ea78420731
parentb6314e3cee2ec9d9f7894fe057cfa7e9d0c50fbc (diff)
downloadPeerTube-73dc4da09e99ce0f6deab33326c731cbcdb52ca1.tar.gz
PeerTube-73dc4da09e99ce0f6deab33326c731cbcdb52ca1.tar.zst
PeerTube-73dc4da09e99ce0f6deab33326c731cbcdb52ca1.zip
Delete highlighted comment too if needed
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comments.component.ts2
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)