mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Fix rank graph showing for unranked users
This commit is contained in:
@ -42,7 +42,9 @@ namespace osu.Game.Overlays.Profile.Header.Components
|
|||||||
|
|
||||||
private void updateStatistics(UserStatistics statistics)
|
private void updateStatistics(UserStatistics statistics)
|
||||||
{
|
{
|
||||||
int[] userRanks = statistics?.RankHistory?.Data;
|
// checking both IsRanked and RankHistory is required.
|
||||||
|
// see https://github.com/ppy/osu-web/blob/154ceafba0f35a1dd935df53ec98ae2ea5615f9f/resources/assets/lib/profile-page/rank-chart.tsx#L46
|
||||||
|
int[] userRanks = statistics?.IsRanked == true ? statistics.RankHistory?.Data : null;
|
||||||
Data = userRanks?.Select((x, index) => new KeyValuePair<int, int>(index, x)).Where(x => x.Value != 0).ToArray();
|
Data = userRanks?.Select((x, index) => new KeyValuePair<int, int>(index, x)).Where(x => x.Value != 0).ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user