Make FlowContainer insertion cleaner

This commit is contained in:
Roman Kapustin
2019-07-01 18:41:08 +03:00
parent 9e5ba5c796
commit 0c95dff3d6
5 changed files with 12 additions and 27 deletions

View File

@ -78,10 +78,8 @@ namespace osu.Game.Overlays.Profile.Header
int displayIndex = index;
LoadComponentAsync(new DrawableBadge(badges[index]), asyncBadge =>
{
badgeFlowContainer.Add(asyncBadge);
// load in stable order regardless of async load order.
badgeFlowContainer.SetLayoutPosition(asyncBadge, displayIndex);
badgeFlowContainer.Insert(displayIndex, asyncBadge);
});
}
}