1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 04:02:59 +08:00

Fix user profile best performance weighting being out of order

This commit is contained in:
Dean Herbert 2020-11-11 10:19:59 +09:00
parent 390f7644d4
commit 53c968e137

View File

@ -46,6 +46,9 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
protected override void OnItemsReceived(List<APILegacyScoreInfo> items)
{
if (VisiblePages == 0)
drawableItemIndex = 0;
base.OnItemsReceived(items);
if (type == ScoreType.Recent)
@ -55,6 +58,8 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
protected override APIRequest<List<APILegacyScoreInfo>> CreateRequest() =>
new GetUserScoresRequest(User.Value.Id, type, VisiblePages++, ItemsPerPage);
private int drawableItemIndex;
protected override Drawable CreateDrawableItem(APILegacyScoreInfo model)
{
switch (type)
@ -63,7 +68,7 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
return new DrawableProfileScore(model.CreateScoreInfo(Rulesets));
case ScoreType.Best:
return new DrawableProfileWeightedScore(model.CreateScoreInfo(Rulesets), Math.Pow(0.95, ItemsContainer.Count));
return new DrawableProfileWeightedScore(model.CreateScoreInfo(Rulesets), Math.Pow(0.95, drawableItemIndex++));
}
}
}