import { Component, ElementRef, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild } from '@angular/core'
import { ActivatedRoute } from '@angular/router'
import { ConfirmService, Notifier } from '@app/core'
-import { Subscription } from 'rxjs'
+import { Subject, Subscription } from 'rxjs'
import { VideoCommentThreadTree } from '../../../../../../shared/models/videos/video-comment.model'
import { AuthService } from '../../../core/auth'
import { ComponentPagination, hasMoreItems } from '../../../shared/rest/component-pagination.model'
syndicationItems: Syndication[] = []
+ onDataSubject = new Subject<any[]>()
+
private sub: Subscription
constructor (
res => {
this.comments = this.comments.concat(res.data)
this.componentPagination.totalItems = res.total
+
+ this.onDataSubject.next(res.data)
},
err => this.notifier.error(err.message)
}
if (commentToDelete.isLocal) {
- message += this.i18n(' The deletion will be sent to remote instances so they remove the comment too.')
+ message += this.i18n(' The deletion will be sent to remote instances, so they remove the comment too.')
} else {
message += this.i18n(' It is a remote comment, so the deletion will only be effective on your instance.')
}