From d5985a97ef663ab0a23a53f89eac8c3485f3b226 Mon Sep 17 00:00:00 2001 From: Dinh Nguyen Date: Tue, 17 Dec 2024 14:49:25 +0700 Subject: [PATCH] update code --- .../src/app/core/services/loading/loading.service.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/marketplace-ui/src/app/core/services/loading/loading.service.ts b/marketplace-ui/src/app/core/services/loading/loading.service.ts index ea0a1fa1..4d582982 100644 --- a/marketplace-ui/src/app/core/services/loading/loading.service.ts +++ b/marketplace-ui/src/app/core/services/loading/loading.service.ts @@ -5,7 +5,6 @@ import { Injectable, signal } from '@angular/core'; }) export class LoadingService { loadingStates = signal<{ [key: string]: boolean }>({}); - activeCallCount = signal(0); private setLoading(componentId: string, isLoading: boolean): void { this.loadingStates.update(states => { @@ -16,14 +15,10 @@ export class LoadingService { } showLoading(componentId: string): void { - this.activeCallCount.set(this.activeCallCount() + 1); this.setLoading(componentId, true); } hideLoading(componentId: string) { - if (this.activeCallCount() > 0) { - this.activeCallCount.set(this.activeCallCount() - 1); - } this.setLoading(componentId, false); } }