1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 13:32:54 +08:00

Mark toasts as read when closing the overlay for added safety

I'm not sure how the read status will play out going forward so I'm just
adding this to keep things conforming for now.
This commit is contained in:
Dean Herbert 2022-08-31 12:46:03 +09:00
parent 9eb615f942
commit 0558dae917
2 changed files with 7 additions and 0 deletions

View File

@ -230,6 +230,7 @@ namespace osu.Game.Overlays
private void markAllRead()
{
sections.Children.ForEach(s => s.MarkAllRead());
toastTray.MarkAllRead();
updateCounts();
}
}

View File

@ -75,6 +75,12 @@ namespace osu.Game.Overlays
};
}
public void MarkAllRead()
{
toastFlow.Children.ForEach(n => n.Read = true);
InternalChildren.OfType<Notification>().ForEach(n => n.Read = true);
}
public void FlushAllToasts()
{
foreach (var notification in toastFlow.ToArray())