Ensure that `DummyAPIAccess` runs all queued tasks on disposal

This commit is contained in:
Dean Herbert 2022-08-20 16:22:35 +09:00
parent cbdd870ecf
commit a1e849c4db
1 changed files with 8 additions and 0 deletions

View File

@ -128,5 +128,13 @@ public RegistrationRequest.RegistrationRequestErrors CreateAccount(string email,
IBindable<UserActivity> IAPIProvider.Activity => Activity;
public void FailNextLogin() => shouldFailNextLogin = true;
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
// Ensure (as much as we can) that any pending tasks are run.
Scheduler.Update();
}
}
}