1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 00:47:24 +08:00

Remove UserRanks object and move to outer country_rank property

This commit is contained in:
Salman Ahmed 2021-03-01 22:41:09 +03:00
parent 3bb46cd8cc
commit fe54a51b5a

View File

@ -29,16 +29,9 @@ namespace osu.Game.Users
[JsonProperty(@"global_rank")]
public int? GlobalRank;
[JsonProperty(@"country_rank")]
public int? CountryRank;
[JsonProperty(@"rank")]
private UserRanks ranks
{
// eventually that will also become an own json property instead of reading from a `rank` object.
// see https://github.com/ppy/osu-web/blob/cb79bb72186c8f1a25f6a6f5ef315123decb4231/app/Transformers/UserStatisticsTransformer.php#L53.
set => CountryRank = value.Country;
}
// populated via User model, as that's where the data currently lives.
public RankHistoryData RankHistory;
@ -119,13 +112,5 @@ namespace osu.Game.Users
}
}
}
#pragma warning disable 649
private struct UserRanks
{
[JsonProperty(@"country")]
public int? Country;
}
#pragma warning restore 649
}
}