mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 17:32:54 +08:00
Fix beatmap carousel tests loading beatmap manager beatmaps in test browser
This commit is contained in:
parent
cb0e698e04
commit
28ac5af91c
@ -497,7 +497,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
AddStep($"Load {beatmapSets.Count} Beatmaps", () =>
|
AddStep($"Load {(beatmapSets.Count > 0 ? beatmapSets.Count.ToString() : "some")} beatmaps", () =>
|
||||||
{
|
{
|
||||||
carousel.Filter(new FilterCriteria());
|
carousel.Filter(new FilterCriteria());
|
||||||
carousel.BeatmapSetsChanged = () => changed = true;
|
carousel.BeatmapSetsChanged = () => changed = true;
|
||||||
@ -697,6 +697,8 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
public new List<DrawableCarouselItem> Items => base.Items;
|
public new List<DrawableCarouselItem> Items => base.Items;
|
||||||
|
|
||||||
public bool PendingFilterTask => PendingFilter != null;
|
public bool PendingFilterTask => PendingFilter != null;
|
||||||
|
|
||||||
|
protected override IEnumerable<BeatmapSetInfo> GetLoadableBeatmaps() => Enumerable.Empty<BeatmapSetInfo>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -153,9 +153,11 @@ namespace osu.Game.Screens.Select
|
|||||||
beatmaps.BeatmapHidden += beatmapHidden;
|
beatmaps.BeatmapHidden += beatmapHidden;
|
||||||
beatmaps.BeatmapRestored += beatmapRestored;
|
beatmaps.BeatmapRestored += beatmapRestored;
|
||||||
|
|
||||||
loadBeatmapSets(beatmaps.GetAllUsableBeatmapSetsEnumerable());
|
loadBeatmapSets(GetLoadableBeatmaps());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual IEnumerable<BeatmapSetInfo> GetLoadableBeatmaps() => beatmaps.GetAllUsableBeatmapSetsEnumerable();
|
||||||
|
|
||||||
public void RemoveBeatmapSet(BeatmapSetInfo beatmapSet) => Schedule(() =>
|
public void RemoveBeatmapSet(BeatmapSetInfo beatmapSet) => Schedule(() =>
|
||||||
{
|
{
|
||||||
var existingSet = beatmapSets.FirstOrDefault(b => b.BeatmapSet.ID == beatmapSet.ID);
|
var existingSet = beatmapSets.FirstOrDefault(b => b.BeatmapSet.ID == beatmapSet.ID);
|
||||||
|
Loading…
Reference in New Issue
Block a user