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:
parent
85ebc8e06c
commit
61bf9a64bb
@ -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;
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user