X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-custom-markup%2Fpeertube-custom-tags%2Fvideos-list-markup.component.ts;fp=client%2Fsrc%2Fapp%2Fshared%2Fshared-custom-markup%2Fpeertube-custom-tags%2Fvideos-list-markup.component.ts;h=7c2e7db6a1bbc5fc7668074d9c2a4087a67131ab;hb=647c2b7d0448e68d8c8ade52d9568e9b33f8638d;hp=70e88ea51ce2ae690d4c8ac26b1a8dcefe30bac7;hpb=d5ae943da9325d2a3c122923bbb78f5a24c95101;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts index 70e88ea51..7c2e7db6a 100644 --- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts +++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts @@ -1,5 +1,5 @@ import { finalize } from 'rxjs/operators' -import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' import { AuthService, Notifier } from '@app/core' import { VideoSortField } from '@shared/models' import { Video, VideoService } from '../../shared-main' @@ -46,7 +46,8 @@ export class VideosListMarkupComponent implements CustomMarkupComponent, OnInit constructor ( private auth: AuthService, private videoService: VideoService, - private notifier: Notifier + private notifier: Notifier, + private cd: ChangeDetectorRef ) { } getUser () { @@ -73,7 +74,10 @@ export class VideosListMarkupComponent implements CustomMarkupComponent, OnInit return this.getVideosObservable() .pipe(finalize(() => this.loaded.emit(true))) .subscribe({ - next: ({ data }) => this.videos = data, + next: ({ data }) => { + this.videos = data + this.cd.markForCheck() + }, error: err => this.notifier.error($localize`Error in videos list component: ${err.message}`) })