Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Use onpush strategy for dropdown

Chocobozzz34ba86a8b481
diff --git a/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts b/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts
index e6164fced0..e39fbd66dd 100644
--- a/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts
+++ b/client/src/app/shared/shared-main/buttons/action-dropdown.component.ts
@@ -1,4 +1,4 @@
-import { Component, Input } from '@angular/core'
+import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
import { Params } from '@angular/router'
import { GlobalIconName } from '@app/shared/shared-icons'
@@ -25,7 +25,8 @@ export type DropdownDirection = 'horizontal' | 'vertical'
@Component({
selector: 'my-action-dropdown',
styleUrls: [ './action-dropdown.component.scss' ],
- templateUrl: './action-dropdown.component.html'
+ templateUrl: './action-dropdown.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush
})
export class ActionDropdownComponent<T> {
diff --git a/client/src/app/shared/shared-main/buttons/button.component.ts b/client/src/app/shared/shared-main/buttons/button.component.ts
index 10d67831f4..1761938eec 100644
--- a/client/src/app/shared/shared-main/buttons/button.component.ts
+++ b/client/src/app/shared/shared-main/buttons/button.component.ts
@@ -1,10 +1,11 @@
-import { Component, Input, OnChanges } from '@angular/core'
+import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core'
import { GlobalIconName } from '@app/shared/shared-icons'
@Component({
selector: 'my-button',
styleUrls: [ './button.component.scss' ],
- templateUrl: './button.component.html'
+ templateUrl: './button.component.html',
+ changeDetection: ChangeDetectionStrategy.OnPush
})
export class ButtonComponent implements OnChanges {