1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:33:30 +08:00

Merge pull request #29762 from peppy/fix-beatmap-difficulty-splitting

Fix beatmap difficulties not being split out on first load
This commit is contained in:
Dean Herbert 2024-09-07 23:12:37 +09:00 committed by GitHub
commit e88083adc1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 1 deletions

View File

@ -520,6 +520,18 @@ namespace osu.Game.Tests.Visual.SongSelect
waitForSelection(set_count);
}
[Solo]
[Test]
public void TestDifficultiesSplitOutOnLoad()
{
loadBeatmaps(new List<BeatmapSetInfo> { TestResources.CreateTestBeatmapSetInfo(diff_count) }, () => new FilterCriteria
{
Sort = SortMode.Difficulty,
});
checkVisibleItemCount(false, 3);
}
[Test]
public void TestAddRemoveDifficultySort()
{

View File

@ -137,6 +137,8 @@ namespace osu.Game.Screens.Select
private void loadNewRoot()
{
beatmapsSplitOut = activeCriteria.SplitOutDifficulties;
// Ensure no changes are made to the list while we are initialising items.
// We'll catch up on changes via subscriptions anyway.
BeatmapSetInfo[] loadableSets = detachedBeatmapSets!.ToArray();
@ -726,7 +728,6 @@ namespace osu.Game.Screens.Select
if (activeCriteria.SplitOutDifficulties != beatmapsSplitOut)
{
beatmapsSplitOut = activeCriteria.SplitOutDifficulties;
loadNewRoot();
return;
}