1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 13:22:57 +08:00

Remove unused includeProtected parameter

This commit is contained in:
Dean Herbert 2021-12-16 20:11:45 +09:00
parent a3276758b8
commit db05727ec4
2 changed files with 6 additions and 13 deletions

View File

@ -102,8 +102,6 @@ namespace osu.Game.Beatmaps
return GetWorkingBeatmap(imported?.Beatmaps.First());
}
#region Delegation to BeatmapModelManager (methods which previously existed locally).
/// <summary>
/// Fired when a single difficulty has been hidden.
/// </summary>
@ -150,19 +148,12 @@ namespace osu.Game.Beatmaps
/// Returns a list of all usable <see cref="BeatmapSetInfo"/>s.
/// </summary>
/// <returns>A list of available <see cref="BeatmapSetInfo"/>.</returns>
public List<BeatmapSetInfo> GetAllUsableBeatmapSets(bool includeProtected = false)
public List<BeatmapSetInfo> GetAllUsableBeatmapSets()
{
using (var context = contextFactory.CreateContext())
return context.All<BeatmapSetInfo>().Where(b => !b.DeletePending && (includeProtected || !b.Protected)).ToList();
return context.All<BeatmapSetInfo>().Where(b => !b.DeletePending).ToList();
}
/// <summary>
/// Returns a list of all usable <see cref="BeatmapSetInfo"/>s. Note that files are not populated. TODO: do we still need this? or rather, should we have the non-enumerable version in the first place?
/// </summary>
/// <param name="includeProtected">Whether to include protected (system) beatmaps. These should not be included for gameplay playable use cases.</param>
/// <returns>A list of available <see cref="BeatmapSetInfo"/>.</returns>
public IEnumerable<BeatmapSetInfo> GetAllUsableBeatmapSetsEnumerable(bool includeProtected = false) => GetAllUsableBeatmapSets(includeProtected);
/// <summary>
/// Perform a lookup query on available <see cref="BeatmapSetInfo"/>s.
/// </summary>
@ -201,6 +192,8 @@ namespace osu.Game.Beatmaps
return context.All<BeatmapInfo>().Where(query);
}
#region Delegation to BeatmapModelManager (methods which previously existed locally).
/// <summary>
/// Perform a lookup query on available <see cref="BeatmapInfo"/>s.
/// </summary>

View File

@ -295,7 +295,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().Any() && DisplayStableImportPrompt)
if (!beatmaps.GetAllUsableBeatmapSets().Any() && DisplayStableImportPrompt)
{
dialogOverlay.Push(new ImportFromStablePopup(() =>
{
@ -421,7 +421,7 @@ namespace osu.Game.Screens.Select
// A selection may not have been possible with filters applied.
// There was possibly a ruleset mismatch. This is a case we can help things along by updating the game-wide ruleset to match.
if (e.NewValue.BeatmapInfo.Ruleset != null && !e.NewValue.BeatmapInfo.Ruleset.Equals(decoupledRuleset.Value))
if (!e.NewValue.BeatmapInfo.Ruleset.Equals(decoupledRuleset.Value))
{
Ruleset.Value = e.NewValue.BeatmapInfo.Ruleset;
transferRulesetValue();