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:
parent
9eb615f942
commit
0558dae917
@ -230,6 +230,7 @@ namespace osu.Game.Overlays
|
||||
private void markAllRead()
|
||||
{
|
||||
sections.Children.ForEach(s => s.MarkAllRead());
|
||||
toastTray.MarkAllRead();
|
||||
updateCounts();
|
||||
}
|
||||
}
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user