From bc48e33b80f357767b98c1d310b04bdda24c6d46 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 13 Jan 2023 09:39:35 +0100 Subject: Optimize custom markup angular tags We can use the on push strategy with these components --- .../peertube-custom-tags/video-miniature-markup.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts') 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 cbbacf77c..c37666359 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 @@ import { finalize } from 'rxjs/operators' -import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' +import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' import { AuthService, Notifier } from '@app/core' import { FindInBulkService } from '@app/shared/shared-search' import { Video } from '../../shared-main' @@ -13,7 +13,8 @@ import { CustomMarkupComponent } from './shared' @Component({ selector: 'my-video-miniature-markup', templateUrl: 'video-miniature-markup.component.html', - styleUrls: [ 'video-miniature-markup.component.scss' ] + styleUrls: [ 'video-miniature-markup.component.scss' ], + changeDetection: ChangeDetectionStrategy.OnPush }) export class VideoMiniatureMarkupComponent implements CustomMarkupComponent, OnInit { @Input() uuid: string -- cgit v1.2.3