mirror of https://github.com/ppy/osu
Make `NotificationOverlay` dependency optional in `CollectionSettings`
This commit is contained in:
parent
392cb352cc
commit
ca68574473
|
@ -20,7 +20,7 @@ public class CollectionsSettings : SettingsSubsection
|
|||
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 @@ private void load(LegacyImportManager? legacyImportManager, IDialogOverlay? dial
|
|||
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!" });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue