mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 17:52:56 +08:00
Ensure the wrong drawable channel isn't shown after load
This commit is contained in:
parent
9f5351e5a1
commit
f88e416d1a
@ -264,6 +264,14 @@ namespace osu.Game.Overlays
|
||||
|
||||
LoadComponentAsync(drawableChannel, loaded =>
|
||||
{
|
||||
// Ensure the current channel hasn't changed by the time the load completes
|
||||
if (currentChannel.Value != newChannel)
|
||||
return;
|
||||
|
||||
// Ensure the cached reference hasn't been removed from leaving the channel
|
||||
if (!loadedChannels.ContainsKey(newChannel))
|
||||
return;
|
||||
|
||||
currentChannelContainer.Clear(false);
|
||||
currentChannelContainer.Add(loaded);
|
||||
loading.Hide();
|
||||
|
Loading…
Reference in New Issue
Block a user