mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 00:09:55 +09:00
Fix some web requests retrieving the user too early
This commit is contained in:
@ -5,6 +5,7 @@ using System;
|
||||
using Newtonsoft.Json;
|
||||
using osu.Framework.IO.Network;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Online.API
|
||||
{
|
||||
@ -61,6 +62,11 @@ namespace osu.Game.Online.API
|
||||
protected APIAccess API;
|
||||
protected WebRequest WebRequest;
|
||||
|
||||
/// <summary>
|
||||
/// The currently logged in user. Note that this will only be populated during <see cref="Perform"/>.
|
||||
/// </summary>
|
||||
protected User User { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Invoked on successful completion of an API request.
|
||||
/// This will be scheduled to the API's internal scheduler (run on update thread automatically).
|
||||
@ -86,6 +92,7 @@ namespace osu.Game.Online.API
|
||||
}
|
||||
|
||||
API = apiAccess;
|
||||
User = apiAccess.LocalUser.Value;
|
||||
|
||||
if (checkAndScheduleFailure())
|
||||
return;
|
||||
|
Reference in New Issue
Block a user