refactor: subscribe to onChange instead of waiting for the event to be received from the manager

This commit is contained in:
2025-02-01 21:23:51 +03:00
parent 369901db78
commit dda0a29300
2 changed files with 16 additions and 12 deletions

View File

@ -4,12 +4,7 @@ namespace Mirea.Api.Endpoint.Common.Services;
public static class ScheduleSyncManager
{
public static event Action? OnUpdateIntervalRequested;
public static event Action? OnForceSyncRequested;
public static void RequestIntervalUpdate() =>
OnUpdateIntervalRequested?.Invoke();
public static void RequestForceSync() =>
OnForceSyncRequested?.Invoke();
}