Forgot to add NotificationMade event.

This commit is contained in:
Michael 2017-02-24 21:41:25 -05:00
parent 894c2275d9
commit dc78cb99e6

View file

@ -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]);
}