fix: integrate UpdateService with RefreshService. Ensured UpdateService actions are cleared when executing all actions in RefreshService.

This commit is contained in:
Developer 02 2024-08-06 17:17:52 +02:00
parent 607761c678
commit cef2690aa8

View File

@ -1,11 +1,12 @@
import { Injectable } from '@angular/core';
import { UpdateService } from './update.service';
@Injectable({
providedIn: 'root'
})
export class RefreshService {
constructor() { }
constructor(private updateService: UpdateService) { }
private actions: Array<() => void> = [];
@ -19,5 +20,6 @@ export class RefreshService {
executeAll(): void {
this.actions.forEach(action => action());
this.updateService.removeAll()
}
}