Inline cancellation token source creation

This commit is contained in:
Dean Herbert 2019-02-27 17:30:20 +09:00
parent 6f5d4ce2e2
commit 43a1df6e5c

View File

@ -121,7 +121,6 @@ namespace osu.Game.Screens.Play
} }
cts?.Cancel(); cts?.Cancel();
cts = new CancellationTokenSource();
LoadComponentAsync(newColumns, c => LoadComponentAsync(newColumns, c =>
{ {
@ -131,7 +130,7 @@ namespace osu.Game.Screens.Play
recalculateValues(); recalculateValues();
redrawFilled(); redrawFilled();
redrawProgress(); redrawProgress();
}, cts.Token); }, (cts = new CancellationTokenSource()).Token);
} }
/// <summary> /// <summary>