1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 16:32:54 +08:00

UserCountry -> Country

This commit is contained in:
Salman Ahmed 2022-07-18 08:40:43 +03:00
parent 100c53f9ef
commit ef6e16b1cb

View File

@ -34,20 +34,20 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonProperty(@"previous_usernames")]
public string[] PreviousUsernames;
private Country? country;
private CountryCode? countryCode;
public Country Country
public CountryCode CountryCode
{
get => country ??= (Enum.TryParse(userCountry?.Code, out Country result) ? result : default);
set => country = value;
get => countryCode ??= (Enum.TryParse(country?.Code, out CountryCode result) ? result : default);
set => countryCode = value;
}
#pragma warning disable 649
[CanBeNull]
[JsonProperty(@"country")]
private UserCountry userCountry;
private Country country;
private class UserCountry
private class Country
{
[JsonProperty(@"code")]
public string Code;