diff options
author | Chocobozzz <me@florianbigard.com> | 2023-01-25 08:59:42 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-01-25 08:59:42 +0100 |
commit | 647c2b7d0448e68d8c8ade52d9568e9b33f8638d (patch) | |
tree | 05f5b5ad84c330bc0bd174527d5ff32c5055a74e /client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts | |
parent | d5ae943da9325d2a3c122923bbb78f5a24c95101 (diff) | |
download | PeerTube-647c2b7d0448e68d8c8ade52d9568e9b33f8638d.tar.gz PeerTube-647c2b7d0448e68d8c8ade52d9568e9b33f8638d.tar.zst PeerTube-647c2b7d0448e68d8c8ade52d9568e9b33f8638d.zip |
Fix custom markup
Diffstat (limited to 'client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts')
-rw-r--r-- | client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts index c37666359..21774b7aa 100644 --- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts +++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { finalize } from 'rxjs/operators' | 1 | import { finalize } from 'rxjs/operators' |
2 | import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' | 2 | import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' |
3 | import { AuthService, Notifier } from '@app/core' | 3 | import { AuthService, Notifier } from '@app/core' |
4 | import { FindInBulkService } from '@app/shared/shared-search' | 4 | import { FindInBulkService } from '@app/shared/shared-search' |
5 | import { Video } from '../../shared-main' | 5 | import { Video } from '../../shared-main' |
@@ -37,7 +37,8 @@ export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnI | |||
37 | constructor ( | 37 | constructor ( |
38 | private auth: AuthService, | 38 | private auth: AuthService, |
39 | private findInBulk: FindInBulkService, | 39 | private findInBulk: FindInBulkService, |
40 | private notifier: Notifier | 40 | private notifier: Notifier, |
41 | private cd: ChangeDetectorRef | ||
41 | ) { } | 42 | ) { } |
42 | 43 | ||
43 | getUser () { | 44 | getUser () { |
@@ -56,7 +57,10 @@ export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnI | |||
56 | this.findInBulk.getVideo(this.uuid) | 57 | this.findInBulk.getVideo(this.uuid) |
57 | .pipe(finalize(() => this.loaded.emit(true))) | 58 | .pipe(finalize(() => this.loaded.emit(true))) |
58 | .subscribe({ | 59 | .subscribe({ |
59 | next: video => this.video = video, | 60 | next: video => { |
61 | this.video = video | ||
62 | this.cd.markForCheck() | ||
63 | }, | ||
60 | 64 | ||
61 | error: err => this.notifier.error($localize`Error in video miniature component: ${err.message}`) | 65 | error: err => this.notifier.error($localize`Error in video miniature component: ${err.message}`) |
62 | }) | 66 | }) |