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

Replace usage of CurrentModeRank in line with API change

This commit is contained in:
Salman Ahmed 2021-03-01 23:07:25 +03:00
parent 51a5652666
commit 2609b22d53
4 changed files with 5 additions and 8 deletions

View File

@ -51,7 +51,7 @@ namespace osu.Game.Tests.Visual.Online
Username = "flyte", Username = "flyte",
Id = 3103765, Id = 3103765,
IsOnline = true, IsOnline = true,
CurrentModeRank = 1111, Statistics = new UserStatistics { GlobalRank = 1111 },
Country = new Country { FlagName = "JP" }, Country = new Country { FlagName = "JP" },
CoverUrl = "https://osu.ppy.sh/images/headers/profile-covers/c6.jpg" CoverUrl = "https://osu.ppy.sh/images/headers/profile-covers/c6.jpg"
}, },
@ -60,7 +60,7 @@ namespace osu.Game.Tests.Visual.Online
Username = "peppy", Username = "peppy",
Id = 2, Id = 2,
IsOnline = false, IsOnline = false,
CurrentModeRank = 2222, Statistics = new UserStatistics { GlobalRank = 2222 },
Country = new Country { FlagName = "AU" }, Country = new Country { FlagName = "AU" },
CoverUrl = "https://osu.ppy.sh/images/headers/profile-covers/c3.jpg", CoverUrl = "https://osu.ppy.sh/images/headers/profile-covers/c3.jpg",
IsSupporter = true, IsSupporter = true,

View File

@ -20,7 +20,7 @@ namespace osu.Game.Tests.Visual.Playlists
Room.RecentParticipants.Add(new User Room.RecentParticipants.Add(new User
{ {
Username = "peppy", Username = "peppy",
CurrentModeRank = 1234, Statistics = new UserStatistics { GlobalRank = 1234 },
Id = 2 Id = 2
}); });
} }

View File

@ -244,7 +244,7 @@ namespace osu.Game.Overlays.Dashboard.Friends
return unsorted.OrderByDescending(u => u.LastVisit).ToList(); return unsorted.OrderByDescending(u => u.LastVisit).ToList();
case UserSortCriteria.Rank: case UserSortCriteria.Rank:
return unsorted.OrderByDescending(u => u.CurrentModeRank.HasValue).ThenBy(u => u.CurrentModeRank ?? 0).ToList(); return unsorted.OrderByDescending(u => u.Statistics.GlobalRank.HasValue).ThenBy(u => u.Statistics.GlobalRank ?? 0).ToList();
case UserSortCriteria.Username: case UserSortCriteria.Username:
return unsorted.OrderBy(u => u.Username).ToList(); return unsorted.OrderBy(u => u.Username).ToList();

View File

@ -72,9 +72,6 @@ namespace osu.Game.Users
[JsonProperty(@"support_level")] [JsonProperty(@"support_level")]
public int SupportLevel; public int SupportLevel;
[JsonProperty(@"current_mode_rank")]
public int? CurrentModeRank;
[JsonProperty(@"is_gmt")] [JsonProperty(@"is_gmt")]
public bool IsGMT; public bool IsGMT;
@ -182,7 +179,7 @@ namespace osu.Game.Users
private UserStatistics statistics; private UserStatistics statistics;
/// <summary> /// <summary>
/// User statistics for the requested ruleset (in the case of a <see cref="GetUserRequest"/> response). /// User statistics for the requested ruleset (in the case of a <see cref="GetUserRequest"/> or <see cref="GetFriendsRequest"/> response).
/// Otherwise empty. /// Otherwise empty.
/// </summary> /// </summary>
[JsonProperty(@"statistics")] [JsonProperty(@"statistics")]