mirror of
https://github.com/ppy/osu.git
synced 2024-11-08 10:47:24 +08:00
Revert "Added user RulesetsStatistics fetching when connecting"
This reverts commit e2cdc66f6d
.
This commit is contained in:
parent
e2cdc66f6d
commit
eb33922417
@ -171,32 +171,12 @@ namespace osu.Game.Online.API
|
|||||||
};
|
};
|
||||||
userReq.Success += u =>
|
userReq.Success += u =>
|
||||||
{
|
{
|
||||||
|
localUser.Value = u;
|
||||||
|
|
||||||
// todo: save/pull from settings
|
// todo: save/pull from settings
|
||||||
u.Status.Value = new UserStatusOnline();
|
localUser.Value.Status.Value = new UserStatusOnline();
|
||||||
|
|
||||||
failureCount = 0;
|
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))
|
if (!handleRequest(userReq))
|
||||||
|
Loading…
Reference in New Issue
Block a user