fix issues with new UI, add color profiles, add sdr brightness for AMD

This commit is contained in:
Vincent Maas committed 2024-09-01 16:24:05 +02:00
1 parent 4d2ca8a552
commit f42a46e53f
95 files changed
+12129 -10005

No files matched your search

@@ -0,0 +1,26 @@
namespace ColorControl.UI.Services;
public class NotificationService
{
public event Func<NotificationDto, Task>? OnNotification;
private List<NotificationDto> _scheduledNotifications = new();
public void SendNotification(NotificationDto notification)
{
var now = DateTime.UtcNow;
if (notification.ScheduledAt == null || notification.ScheduledAt <= now)
{
OnNotification?.Invoke(notification);
return;
}
Task.Run(async () =>
{
await Task.Delay(notification.ScheduledAt.Value - now);
OnNotification?.Invoke(notification);
});
}
}