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

Make NotificationOverlay dependency optional in CollectionSettings

This commit is contained in:
Dean Herbert 2022-07-28 14:35:27 +09:00
parent 392cb352cc
commit ca68574473

View File

@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
private RealmAccess realm { get; set; } = null!;
[Resolved]
private INotificationOverlay notificationOverlay { get; set; } = null!;
private INotificationOverlay? notificationOverlay { get; set; }
[BackgroundDependencyLoader]
private void load(LegacyImportManager? legacyImportManager, IDialogOverlay? dialogOverlay)
@ -51,7 +51,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
private void deleteAllCollections()
{
realm.Write(r => r.RemoveAll<BeatmapCollection>());
notificationOverlay.Post(new ProgressCompletionNotification { Text = "Deleted all collections!" });
notificationOverlay?.Post(new ProgressCompletionNotification { Text = "Deleted all collections!" });
}
}
}