From ddeee09a5193fd79135540b26c54e81a14590e70 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Wed, 15 Jun 2022 03:36:38 +0300 Subject: [PATCH] Fix important notifications interrupting first-run setup --- osu.Game/Overlays/NotificationOverlay.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/osu.Game/Overlays/NotificationOverlay.cs b/osu.Game/Overlays/NotificationOverlay.cs index f1ed5c4ba6..e4ee2fe049 100644 --- a/osu.Game/Overlays/NotificationOverlay.cs +++ b/osu.Game/Overlays/NotificationOverlay.cs @@ -35,6 +35,9 @@ namespace osu.Game.Overlays [Resolved] private AudioManager audio { get; set; } + [Resolved(canBeNull: true)] + private FirstRunSetupOverlay firstRunSetup { get; set; } + [BackgroundDependencyLoader] private void load() { @@ -130,7 +133,9 @@ namespace osu.Game.Overlays var section = sections.Children.FirstOrDefault(s => s.AcceptTypes.Any(accept => accept.IsAssignableFrom(ourType))); section?.Add(notification, notification.DisplayOnTop ? -runningDepth : runningDepth); - if (notification.IsImportant) + // we don't want important notifications interrupting user on first-run setup. + // (this can happen when importing beatmaps inside setup, which posts import notifications) + if (notification.IsImportant && firstRunSetup?.State.Value != Visibility.Visible) Show(); updateCounts();