Merge remote-tracking branch 'refs/remotes/shiftos-game/master'

This commit is contained in:
lempamo 2017-02-25 17:11:53 -05:00
commit f51200b5d7

View file

@ -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