import { Location } from '@angular/common'
import { immutableAssign } from '@app/shared/misc/utils'
import { NotificationsService } from 'angular2-notifications'
-import 'rxjs/add/observable/from'
-import 'rxjs/add/operator/concatAll'
import { AuthService } from '../../core/auth'
import { ConfirmService } from '../../core/confirm'
import { AbstractVideoList } from '../../shared/video/abstract-video-list'
import { VideoService } from '../../shared/video/video.service'
import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
+import { tap } from 'rxjs/operators'
@Component({
selector: 'my-video-channel-videos',
getVideosObservable (page: number) {
const newPagination = immutableAssign(this.pagination, { currentPage: page })
- return this.videoService.getVideoChannelVideos(this.videoChannel, newPagination, this.sort)
+ return this.videoService
+ .getVideoChannelVideos(this.videoChannel, newPagination, this.sort)
+ .pipe(tap(({ totalVideos }) => this.titlePage = `Published ${totalVideos} videos`))
}
generateSyndicationList () {