1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 00:47:24 +08:00

Remove pointless ScheduledDelegate

This commit is contained in:
Andrei Zavatski 2019-12-05 05:20:22 +03:00
parent 48732e49b9
commit f8f144b6c0

View File

@ -15,7 +15,6 @@ using osu.Game.Online.API;
using System.Threading;
using osu.Game.Online.API.Requests;
using osu.Game.Overlays.Rankings.Tables;
using osu.Framework.Threading;
namespace osu.Game.Overlays
{
@ -31,7 +30,6 @@ namespace osu.Game.Overlays
private readonly DimmedLoadingLayer loading;
private APIRequest request;
private ScheduledDelegate showTableDelegate;
private CancellationTokenSource cancellationToken;
[Resolved]
@ -122,7 +120,6 @@ namespace osu.Game.Overlays
loading.Show();
showTableDelegate?.Cancel();
cancellationToken?.Cancel();
request?.Cancel();
@ -185,12 +182,12 @@ namespace osu.Game.Overlays
private void loadTable(Drawable table)
{
showTableDelegate = Schedule(() => LoadComponentAsync(table, t =>
LoadComponentAsync(table, t =>
{
contentPlaceholder.Clear();
contentPlaceholder.Add(t);
loading.Hide();
}, (cancellationToken = new CancellationTokenSource()).Token));
}, (cancellationToken = new CancellationTokenSource()).Token);
}
}
}