mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-23 02:12:14 +00:00
Forgot to add NotificationMade event.
This commit is contained in:
parent
894c2275d9
commit
dc78cb99e6
1 changed files with 3 additions and 0 deletions
|
@ -25,11 +25,14 @@ namespace ShiftOS.Engine
|
|||
Utils.WriteAllText(Paths.GetPath("notifications.dat"), JsonConvert.SerializeObject(notes, Formatting.Indented));
|
||||
}
|
||||
|
||||
public static event Action<Notification> NotificationMade;
|
||||
|
||||
public static void AddNotification(NotificationType note, object data)
|
||||
{
|
||||
var lst = new List<Notification>(GetAllFromFile());
|
||||
lst.Add(new Engine.Notification(note, data));
|
||||
WriteNotes(lst.ToArray());
|
||||
NotificationMade?.Invoke(lst[lst.Count - 1]);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue