1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:47:26 +08:00

Mark StableImportManager as potentially null in tests.

(StableImportManager is added to the DI in OsuGame and not in the OsuGameBase)
This commit is contained in:
Lucas A 2021-05-16 17:49:49 +02:00
parent ed4c025c7e
commit db255e6814

View File

@ -30,9 +30,9 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
private TriangleButton undeleteButton;
[BackgroundDependencyLoader(permitNulls: true)]
private void load(BeatmapManager beatmaps, ScoreManager scores, SkinManager skins, [CanBeNull] CollectionManager collectionManager, StableImportManager stableImportManager, DialogOverlay dialogOverlay)
private void load(BeatmapManager beatmaps, ScoreManager scores, SkinManager skins, [CanBeNull] CollectionManager collectionManager, [CanBeNull] StableImportManager stableImportManager, DialogOverlay dialogOverlay)
{
if (stableImportManager.SupportsImportFromStable)
if (stableImportManager?.SupportsImportFromStable ?? false)
{
Add(importBeatmapsButton = new SettingsButton
{
@ -58,7 +58,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
}
});
if (stableImportManager.SupportsImportFromStable)
if (stableImportManager?.SupportsImportFromStable ?? false)
{
Add(importScoresButton = new SettingsButton
{
@ -84,7 +84,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
}
});
if (stableImportManager.SupportsImportFromStable)
if (stableImportManager?.SupportsImportFromStable ?? false)
{
Add(importSkinsButton = new SettingsButton
{
@ -112,7 +112,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
if (collectionManager != null)
{
if (stableImportManager.SupportsImportFromStable)
if (stableImportManager?.SupportsImportFromStable ?? false)
{
Add(importCollectionsButton = new SettingsButton
{