mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Revert failed user requests changes with returning user ID instead
This commit is contained in:
parent
85ebc8e06c
commit
61bf9a64bb
@ -277,8 +277,7 @@ namespace osu.Game.Tournament.Screens.Editors
|
||||
userId.Value = user.Id.ToString();
|
||||
userId.BindValueChanged(idString =>
|
||||
{
|
||||
if (!(int.TryParse(idString.NewValue, out var parsed)))
|
||||
return;
|
||||
int.TryParse(idString.NewValue, out var parsed);
|
||||
|
||||
user.Id = parsed;
|
||||
|
||||
|
@ -217,6 +217,8 @@ namespace osu.Game.Tournament
|
||||
|
||||
req.Success += res =>
|
||||
{
|
||||
user.Id = res.Id;
|
||||
|
||||
user.Username = res.Username;
|
||||
user.Statistics = res.Statistics;
|
||||
user.Country = res.Country;
|
||||
@ -225,7 +227,11 @@ namespace osu.Game.Tournament
|
||||
success?.Invoke();
|
||||
};
|
||||
|
||||
req.Failure += _ => failure?.Invoke();
|
||||
req.Failure += _ =>
|
||||
{
|
||||
user.Id = 1;
|
||||
failure?.Invoke();
|
||||
};
|
||||
|
||||
if (immediate)
|
||||
API.Perform(req);
|
||||
|
Loading…
Reference in New Issue
Block a user