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:
parent
ed4c025c7e
commit
db255e6814
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user