1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 15:57:24 +08:00

Revert failed user requests changes with returning user ID instead

This commit is contained in:
Salman Ahmed 2021-02-17 11:21:33 +03:00
parent 85ebc8e06c
commit 61bf9a64bb
2 changed files with 8 additions and 3 deletions

View File

@ -277,8 +277,7 @@ namespace osu.Game.Tournament.Screens.Editors
userId.Value = user.Id.ToString(); userId.Value = user.Id.ToString();
userId.BindValueChanged(idString => userId.BindValueChanged(idString =>
{ {
if (!(int.TryParse(idString.NewValue, out var parsed))) int.TryParse(idString.NewValue, out var parsed);
return;
user.Id = parsed; user.Id = parsed;

View File

@ -217,6 +217,8 @@ namespace osu.Game.Tournament
req.Success += res => req.Success += res =>
{ {
user.Id = res.Id;
user.Username = res.Username; user.Username = res.Username;
user.Statistics = res.Statistics; user.Statistics = res.Statistics;
user.Country = res.Country; user.Country = res.Country;
@ -225,7 +227,11 @@ namespace osu.Game.Tournament
success?.Invoke(); success?.Invoke();
}; };
req.Failure += _ => failure?.Invoke(); req.Failure += _ =>
{
user.Id = 1;
failure?.Invoke();
};
if (immediate) if (immediate)
API.Perform(req); API.Perform(req);