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

Simplify IsCurrentScreen check to only apply to relevant call

This commit is contained in:
Dean Herbert 2022-04-06 11:32:35 +09:00
parent 0b6db31511
commit 01da3924cc

View File

@ -74,18 +74,13 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
task.FireAndForget(onSuccess: () => Schedule(() =>
{
loadingLayer.Hide();
// If an error or server side trigger occurred this screen may have already exited by external means.
if (!this.IsCurrentScreen())
return;
loadingLayer.Hide();
this.Exit();
this.Exit();
}), onError: _ => Schedule(() =>
{
// If an error or server side trigger occurred this screen may have already exited by external means.
if (!this.IsCurrentScreen())
return;
loadingLayer.Hide();
Carousel.AllowSelection = true;
}));