mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 21:07:18 +09: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 =>
|
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.Clear(false);
|
||||||
currentChannelContainer.Add(loaded);
|
currentChannelContainer.Add(loaded);
|
||||||
loading.Hide();
|
loading.Hide();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user