// Scroll to the highlighted thread
setTimeout(() => {
// -60 because of the fixed header
- console.log(this.commentHighlightBlock.nativeElement.offsetTop)
const scrollY = this.commentHighlightBlock.nativeElement.offsetTop - 60
window.scroll(0, scrollY)
}, 500)
// 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)