Fix beatmap listing potentially showing duplicate beatmap cards

This commit is contained in:
Salman Ahmed
2022-09-13 01:38:52 +03:00
parent a5b962d9a3
commit 07f577a0c6
2 changed files with 15 additions and 2 deletions

View File

@ -176,6 +176,8 @@ namespace osu.Game.Overlays
}
else
{
newCards = newCards.Except(foundContent);
panelLoadTask = LoadComponentsAsync(newCards, loaded =>
{
lastFetchDisplayedTime = Time.Current;
@ -185,7 +187,7 @@ namespace osu.Game.Overlays
}
}
private BeatmapCard[] createCardsFor(IEnumerable<APIBeatmapSet> beatmapSets) => beatmapSets.Select(set => BeatmapCard.Create(set, filterControl.CardSize.Value).With(c =>
private IEnumerable<BeatmapCard> createCardsFor(IEnumerable<APIBeatmapSet> beatmapSets) => beatmapSets.Select(set => BeatmapCard.Create(set, filterControl.CardSize.Value).With(c =>
{
c.Anchor = Anchor.TopCentre;
c.Origin = Anchor.TopCentre;