aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ShiftOS_TheReturn/NotificationDaemon.cs5
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