From 2cdfeb84d6768523ea8994a31b922ace16831836 Mon Sep 17 00:00:00 2001 From: Erwin <111194281+Erwin-N@users.noreply.github.com> Date: Fri, 3 Apr 2026 17:03:26 +0200 Subject: [PATCH] Task/eliminate OnDestroy lifecycle hook from create watchlist item dialog component (#6676) Eliminate OnDestroy lifecycle hook --- .../create-watchlist-item-dialog.component.ts | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/apps/client/src/app/components/home-watchlist/create-watchlist-item-dialog/create-watchlist-item-dialog.component.ts b/apps/client/src/app/components/home-watchlist/create-watchlist-item-dialog/create-watchlist-item-dialog.component.ts index 60d74be92..4669a827d 100644 --- a/apps/client/src/app/components/home-watchlist/create-watchlist-item-dialog/create-watchlist-item-dialog.component.ts +++ b/apps/client/src/app/components/home-watchlist/create-watchlist-item-dialog/create-watchlist-item-dialog.component.ts @@ -1,11 +1,6 @@ import { GfSymbolAutocompleteComponent } from '@ghostfolio/ui/symbol-autocomplete'; -import { - ChangeDetectionStrategy, - Component, - OnDestroy, - OnInit -} from '@angular/core'; +import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { AbstractControl, FormBuilder, @@ -19,7 +14,6 @@ import { import { MatButtonModule } from '@angular/material/button'; import { MatDialogModule, MatDialogRef } from '@angular/material/dialog'; import { MatFormFieldModule } from '@angular/material/form-field'; -import { Subject } from 'rxjs'; @Component({ changeDetection: ChangeDetectionStrategy.OnPush, @@ -36,11 +30,9 @@ import { Subject } from 'rxjs'; styleUrls: ['./create-watchlist-item-dialog.component.scss'], templateUrl: 'create-watchlist-item-dialog.html' }) -export class GfCreateWatchlistItemDialogComponent implements OnDestroy, OnInit { +export class GfCreateWatchlistItemDialogComponent implements OnInit { public createWatchlistItemForm: FormGroup; - private unsubscribeSubject = new Subject(); - public constructor( public readonly dialogRef: MatDialogRef, public readonly formBuilder: FormBuilder @@ -69,11 +61,6 @@ export class GfCreateWatchlistItemDialogComponent implements OnDestroy, OnInit { }); } - public ngOnDestroy() { - this.unsubscribeSubject.next(); - this.unsubscribeSubject.complete(); - } - private validator(control: AbstractControl): ValidationErrors { const searchSymbolControl = control.get('searchSymbol');