1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-08 05:50:05 +08:00

Revert "Added user RulesetsStatistics fetching when connecting"

This reverts commit e2cdc66f6d.
This commit is contained in:
tornac1234 2022-06-08 18:13:08 +02:00
parent e2cdc66f6d
commit eb33922417

View File

@ -171,32 +171,12 @@ namespace osu.Game.Online.API
};
userReq.Success += u =>
{
localUser.Value = u;
// todo: save/pull from settings
u.Status.Value = new UserStatusOnline();
localUser.Value.Status.Value = new UserStatusOnline();
failureCount = 0;
// getting user's full statistics (concerning every ruleset)
// we delay the localUser.Value setting because BindValueChanged won't record two value changes in a row
var statsRequest = new GetUsersRequest(new int[] { u.Id });
statsRequest.Failure += _ =>
{
localUser.Value = u;
failConnectionProcess();
};
statsRequest.Success += result =>
{
if (result.Users.Count == 1)
{
u.RulesetsStatistics = result.Users[0].RulesetsStatistics;
localUser.Value = u;
return;
}
// Should never... happen ?
statsRequest.Fail(new Exception("Empty response for GetUsersRequest"));
};
handleRequest(statsRequest);
};
if (!handleRequest(userReq))