mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Decouple APILegacyScoreInfo from ScoreInfo
This commit is contained in:
@ -29,14 +29,6 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
ItemsContainer.Direction = FillDirection.Vertical;
|
||||
}
|
||||
|
||||
protected override void UpdateItems(List<APILegacyScoreInfo> items)
|
||||
{
|
||||
foreach (var item in items)
|
||||
item.Ruleset = Rulesets.GetRuleset(item.RulesetID);
|
||||
|
||||
base.UpdateItems(items);
|
||||
}
|
||||
|
||||
protected override APIRequest<List<APILegacyScoreInfo>> CreateRequest() =>
|
||||
new GetUserScoresRequest(User.Value.Id, type, VisiblePages++, ItemsPerPage);
|
||||
|
||||
@ -45,10 +37,10 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
|
||||
switch (type)
|
||||
{
|
||||
default:
|
||||
return new DrawablePerformanceScore(model, includeWeight ? Math.Pow(0.95, ItemsContainer.Count) : (double?)null);
|
||||
return new DrawablePerformanceScore(model.CreateScoreInfo(Rulesets), includeWeight ? Math.Pow(0.95, ItemsContainer.Count) : (double?)null);
|
||||
|
||||
case ScoreType.Recent:
|
||||
return new DrawableTotalScore(model);
|
||||
return new DrawableTotalScore(model.CreateScoreInfo(Rulesets));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user