diff options
| author | lempamo <[email protected]> | 2017-02-25 17:11:53 -0500 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-02-25 17:11:53 -0500 |
| commit | f51200b5d763f11c151a01909aea7a400f267a86 (patch) | |
| tree | b44462682d64b91e941c0b3f20134a365964ed40 | |
| parent | 5dd55f698bf6bca956a2e207c34dacdcb140e182 (diff) | |
| parent | 8a60eba70b4875c7e382b933d1c835f6f857cdd0 (diff) | |
| download | shiftos_thereturn-f51200b5d763f11c151a01909aea7a400f267a86.tar.gz shiftos_thereturn-f51200b5d763f11c151a01909aea7a400f267a86.tar.bz2 shiftos_thereturn-f51200b5d763f11c151a01909aea7a400f267a86.zip | |
Merge remote-tracking branch 'refs/remotes/shiftos-game/master'
| -rw-r--r-- | ShiftOS_TheReturn/NotificationDaemon.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ShiftOS_TheReturn/NotificationDaemon.cs b/ShiftOS_TheReturn/NotificationDaemon.cs index f9bfed2..6eb0b7b 100644 --- a/ShiftOS_TheReturn/NotificationDaemon.cs +++ b/ShiftOS_TheReturn/NotificationDaemon.cs @@ -35,6 +35,7 @@ namespace ShiftOS.Engine NotificationMade?.Invoke(lst[lst.Count - 1]); } + public static event Action NotificationRead; public static void MarkAllRead() { @@ -45,14 +46,13 @@ namespace ShiftOS.Engine public static void MarkRead(int note) { - var lst = new List<Notification>(GetAllFromFile()); var notes = GetAllFromFile(); if (note >= notes.Length || note < 0) throw new ArgumentOutOfRangeException("note", new Exception("You cannot mark a notification that does not exist as read.")); notes[note].Read = true; WriteNotes(notes); - NotificationMade?.Invoke(lst[lst.Count - 1]); + NotificationRead?.Invoke(); } public static int GetUnreadCount() @@ -63,6 +63,7 @@ namespace ShiftOS.Engine c++; //gahh I hate that programming language. return c; } + } public struct Notification |
