aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn
diff options
context:
space:
mode:
authorwilliam341 <[email protected]>2017-02-25 15:02:40 -0700
committerwilliam341 <[email protected]>2017-02-25 15:02:40 -0700
commitf4ce36a18a125160dc3faa1110e060e9a58a7274 (patch)
tree6dc265c0b819f19156ac3a24f5bc8a5f72755467 /ShiftOS_TheReturn
parent00f676a5d4df6f826d4a6c5af260fbfc168cea28 (diff)
downloadshiftos_thereturn-f4ce36a18a125160dc3faa1110e060e9a58a7274.tar.gz
shiftos_thereturn-f4ce36a18a125160dc3faa1110e060e9a58a7274.tar.bz2
shiftos_thereturn-f4ce36a18a125160dc3faa1110e060e9a58a7274.zip
kek i should push dis
Diffstat (limited to 'ShiftOS_TheReturn')
-rw-r--r--ShiftOS_TheReturn/NotificationDaemon.cs11
1 files changed, 2 insertions, 9 deletions
diff --git a/ShiftOS_TheReturn/NotificationDaemon.cs b/ShiftOS_TheReturn/NotificationDaemon.cs
index f9bfed2..034db7e 100644
--- a/ShiftOS_TheReturn/NotificationDaemon.cs
+++ b/ShiftOS_TheReturn/NotificationDaemon.cs
@@ -35,24 +35,17 @@ namespace ShiftOS.Engine
NotificationMade?.Invoke(lst[lst.Count - 1]);
}
-
- public static void MarkAllRead()
- {
- var notes = GetAllFromFile();
- for (int i = 0; i < notes.Length; i++)
- MarkRead(i);
- }
+ public static event Action NotificationRead;
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()