mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-23 02:12:14 +00:00
kek i should push dis
This commit is contained in:
parent
00f676a5d4
commit
f4ce36a18a
1 changed files with 2 additions and 9 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue