mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-23 02:12:14 +00:00
Merge remote-tracking branch 'refs/remotes/shiftos-game/master'
This commit is contained in:
commit
f51200b5d7
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue