1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Merge conditionnal expression.

This commit is contained in:
Lucas A 2021-05-17 22:01:05 +02:00
parent 8530b31e39
commit 79740dd2d8

View File

@ -51,7 +51,7 @@ namespace osu.Game.Screens.Select
protected virtual bool ShowFooter => true;
protected virtual bool DisplayStableImportPrompt => true;
protected virtual bool DisplayStableImportPrompt => stableImportManager.SupportsImportFromStable;
/// <summary>
/// Can be null if <see cref="ShowFooter"/> is false.
@ -85,6 +85,9 @@ namespace osu.Game.Screens.Select
[Resolved]
private BeatmapManager beatmaps { get; set; }
[Resolved]
private StableImportManager stableImportManager { get; set; }
protected ModSelectOverlay ModSelect { get; private set; }
protected Sample SampleConfirm { get; private set; }
@ -102,7 +105,7 @@ namespace osu.Game.Screens.Select
private MusicController music { get; set; }
[BackgroundDependencyLoader(true)]
private void load(AudioManager audio, DialogOverlay dialog, OsuColour colours, StableImportManager stableImportManager, ManageCollectionsDialog manageCollectionsDialog, DifficultyRecommender recommender)
private void load(AudioManager audio, DialogOverlay dialog, OsuColour colours, ManageCollectionsDialog manageCollectionsDialog, DifficultyRecommender recommender)
{
// initial value transfer is required for FilterControl (it uses our re-cached bindables in its async load for the initial filter).
transferRulesetValue();
@ -284,7 +287,7 @@ namespace osu.Game.Screens.Select
Schedule(() =>
{
// if we have no beatmaps, let's prompt the user to import from over a stable install if he has one.
if (!beatmaps.GetAllUsableBeatmapSetsEnumerable(IncludedDetails.Minimal).Any() && stableImportManager.SupportsImportFromStable && DisplayStableImportPrompt)
if (!beatmaps.GetAllUsableBeatmapSetsEnumerable(IncludedDetails.Minimal).Any() && DisplayStableImportPrompt)
{
dialogOverlay.Push(new ImportFromStablePopup(() =>
{