Expose API scheduling internally

This commit is contained in:
Dean Herbert
2018-03-14 11:37:50 +09:00
parent 07642546bb
commit ce2997419a
3 changed files with 5 additions and 3 deletions

View File

@ -85,7 +85,7 @@ namespace osu.Game.Online.API
if (checkAndProcessFailure())
return;
api.Scheduler.Add(delegate { Success?.Invoke(); });
api.Schedule(delegate { Success?.Invoke(); });
}
public void Cancel() => Fail(new OperationCanceledException(@"Request cancelled"));
@ -108,7 +108,7 @@ namespace osu.Game.Online.API
{
if (API == null || pendingFailure == null) return cancelled;
API.Scheduler.Add(pendingFailure);
API.Schedule(pendingFailure);
pendingFailure = null;
return true;
}