From 647c2b7d0448e68d8c8ade52d9568e9b33f8638d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 25 Jan 2023 08:59:42 +0100 Subject: Fix custom markup --- .../peertube-custom-tags/videos-list-markup.component.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts') 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}`) }) -- cgit v1.2.3