mirror of
https://github.com/ppy/osu
synced 2025-02-25 23:21:26 +00:00
Make NotificationOverlay
dependency optional in CollectionSettings
This commit is contained in:
parent
392cb352cc
commit
ca68574473
@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
private RealmAccess realm { get; set; } = null!;
|
private RealmAccess realm { get; set; } = null!;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private INotificationOverlay notificationOverlay { get; set; } = null!;
|
private INotificationOverlay? notificationOverlay { get; set; }
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(LegacyImportManager? legacyImportManager, IDialogOverlay? dialogOverlay)
|
private void load(LegacyImportManager? legacyImportManager, IDialogOverlay? dialogOverlay)
|
||||||
@ -51,7 +51,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
private void deleteAllCollections()
|
private void deleteAllCollections()
|
||||||
{
|
{
|
||||||
realm.Write(r => r.RemoveAll<BeatmapCollection>());
|
realm.Write(r => r.RemoveAll<BeatmapCollection>());
|
||||||
notificationOverlay.Post(new ProgressCompletionNotification { Text = "Deleted all collections!" });
|
notificationOverlay?.Post(new ProgressCompletionNotification { Text = "Deleted all collections!" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user