diff --git a/osu.Game/Graphics/UserInterface/HoverSounds.cs b/osu.Game/Graphics/UserInterface/HoverSounds.cs
index c0ef5cb3fc..7db1efc75f 100644
--- a/osu.Game/Graphics/UserInterface/HoverSounds.cs
+++ b/osu.Game/Graphics/UserInterface/HoverSounds.cs
@@ -6,7 +6,6 @@ using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
using osu.Framework.Extensions;
using osu.Framework.Graphics;
-using osu.Game.Configuration;
using osu.Framework.Utils;
namespace osu.Game.Graphics.UserInterface
@@ -28,7 +27,7 @@ namespace osu.Game.Graphics.UserInterface
}
[BackgroundDependencyLoader]
- private void load(AudioManager audio, SessionStatics statics)
+ private void load(AudioManager audio)
{
sampleHover = audio.Samples.Get($@"UI/{SampleSet.GetDescription()}-hover")
?? audio.Samples.Get($@"UI/{HoverSampleSet.Default.GetDescription()}-hover");
diff --git a/osu.Game/Overlays/NotificationOverlay.cs b/osu.Game/Overlays/NotificationOverlay.cs
index 2175e17da9..f5b0bf2a7d 100644
--- a/osu.Game/Overlays/NotificationOverlay.cs
+++ b/osu.Game/Overlays/NotificationOverlay.cs
@@ -98,14 +98,16 @@ namespace osu.Game.Overlays
private int runningDepth;
- private void notificationClosed() => updateCounts();
-
private readonly Scheduler postScheduler = new Scheduler();
public override bool IsPresent => base.IsPresent || postScheduler.HasPendingTasks;
private bool processingPosts = true;
+ ///
+ /// Post a new notification for display.
+ ///
+ /// The notification to display.
public void Post(Notification notification) => postScheduler.Add(() =>
{
++runningDepth;
@@ -129,6 +131,7 @@ namespace osu.Game.Overlays
protected override void Update()
{
base.Update();
+
if (processingPosts)
postScheduler.Update();
}
@@ -151,6 +154,8 @@ namespace osu.Game.Overlays
this.FadeTo(0, TRANSITION_LENGTH, Easing.OutQuint);
}
+ private void notificationClosed() => updateCounts();
+
private void updateCounts()
{
UnreadCount.Value = sections.Select(c => c.UnreadCount).Sum();