1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 05:53:10 +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",
Id = 3103765,
IsOnline = true,
CurrentModeRank = 1111,
Statistics = new UserStatistics { GlobalRank = 1111 },
Country = new Country { FlagName = "JP" },
CoverUrl = "https://osu.ppy.sh/images/headers/profile-covers/c6.jpg"
},
@ -60,7 +60,7 @@ namespace osu.Game.Tests.Visual.Online
Username = "peppy",
Id = 2,
IsOnline = false,
CurrentModeRank = 2222,
Statistics = new UserStatistics { GlobalRank = 2222 },
Country = new Country { FlagName = "AU" },
CoverUrl = "https://osu.ppy.sh/images/headers/profile-covers/c3.jpg",
IsSupporter = true,

View File

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

View File

@ -244,7 +244,7 @@ namespace osu.Game.Overlays.Dashboard.Friends
return unsorted.OrderByDescending(u => u.LastVisit).ToList();
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:
return unsorted.OrderBy(u => u.Username).ToList();

View File

@ -72,9 +72,6 @@ namespace osu.Game.Users
[JsonProperty(@"support_level")]
public int SupportLevel;
[JsonProperty(@"current_mode_rank")]
public int? CurrentModeRank;
[JsonProperty(@"is_gmt")]
public bool IsGMT;
@ -182,7 +179,7 @@ namespace osu.Game.Users
private UserStatistics statistics;
/// <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.
/// </summary>
[JsonProperty(@"statistics")]