mirror of
https://github.com/Maassoft/ColorControl.git
synced 2026-10-22 00:22:18 -05:00
fix issues with new UI, add color profiles, add sdr brightness for AMD
This commit is contained in:
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);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user