Browse Source

Set the change detection strategy to OnPush in the analysis page

pull/7275/head
Vyacheslav 7 days ago
parent
commit
a34e84614c
  1. 1
      CHANGELOG.md
  2. 6
      apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts

1
CHANGELOG.md

@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Improved the user account deletion flow in the user settings of the user account page
- Set the change detection strategy to `OnPush` in the analysis page
- Set the change detection strategy to `OnPush` in the portfolio holdings page
- Set the change detection strategy to `OnPush` in the _FIRE_ page
- Set the change detection strategy to `OnPush` in the users section of the admin control panel

6
apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts

@ -25,6 +25,7 @@ import { GfValueComponent } from '@ghostfolio/ui/value';
import { Clipboard } from '@angular/cdk/clipboard';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
computed,
@ -51,6 +52,7 @@ import { DeviceDetectorService } from 'ngx-device-detector';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
GfBenchmarkComparatorComponent,
GfInvestmentChartComponent,
@ -148,6 +150,8 @@ export class GfAnalysisPageComponent implements OnInit {
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe((impersonationId) => {
this.hasImpersonationId = !!impersonationId;
this.changeDetectorRef.markForCheck();
});
this.userService.stateChanged
@ -229,6 +233,8 @@ export class GfAnalysisPageComponent implements OnInit {
} else if (mode === 'portfolio') {
this.isLoadingPortfolioPrompt = false;
}
this.changeDetectorRef.markForCheck();
});
}

Loading…
Cancel
Save