1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:20:04 +08:00

Move cancellation token construction closer to usage

This commit is contained in:
Dean Herbert 2019-12-19 11:26:22 +09:00
parent dd68106d90
commit a46602f705

View File

@ -146,8 +146,6 @@ namespace osu.Game.Overlays
return; return;
} }
loadCancellation = new CancellationTokenSource();
IEnumerable<User> sortedUsers = Users; IEnumerable<User> sortedUsers = Users;
switch (Filter.Tabs.Current.Value) switch (Filter.Tabs.Current.Value)
@ -202,7 +200,7 @@ namespace osu.Game.Overlays
loading.Hide(); loading.Hide();
ScrollFlow.Add(panels = newPanels); ScrollFlow.Add(panels = newPanels);
}, loadCancellation.Token); }, (loadCancellation = new CancellationTokenSource()).Token);
} }
private void onFilterUpdate() private void onFilterUpdate()