Fix test failures

This commit is contained in:
Dean Herbert
2019-12-06 19:04:55 +09:00
parent 46d055604a
commit 347373a3ba
2 changed files with 14 additions and 11 deletions

View File

@ -57,6 +57,15 @@ namespace osu.Game.Overlays.Mods
}).ToArray();
modsLoadCts?.Cancel();
if (modContainers.Length == 0)
{
ModIconsLoaded = true;
headerLabel.Hide();
Hide();
return;
}
ModIconsLoaded = false;
LoadComponentsAsync(modContainers, c =>
@ -67,17 +76,8 @@ namespace osu.Game.Overlays.Mods
buttons = modContainers.OfType<ModButton>().ToArray();
if (value.Any())
{
headerLabel.FadeIn(200);
this.FadeIn(200);
}
else
{
// transition here looks weird as mods instantly disappear.
headerLabel.Hide();
Hide();
}
headerLabel.FadeIn(200);
this.FadeIn(200);
}
}