mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 00:53:19 +08:00
Remove pointless ScheduledDelegate
This commit is contained in:
parent
48732e49b9
commit
f8f144b6c0
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user