1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 04:42:55 +08:00

Reduce nesting slightly

This commit is contained in:
Dean Herbert 2025-01-05 00:32:06 +09:00
parent 3fc86f60ee
commit 37da72d764
No known key found for this signature in database

View File

@ -317,15 +317,14 @@ namespace osu.Game.Screens.Menu
private void displayLoginIfApplicable() private void displayLoginIfApplicable()
{ {
if (loginDisplayed.Value) return;
if (!api.IsLoggedIn || api.State.Value == APIState.RequiresSecondFactorAuth) if (!api.IsLoggedIn || api.State.Value == APIState.RequiresSecondFactorAuth)
{
if (!loginDisplayed.Value)
{ {
Scheduler.AddDelayed(() => login?.Show(), 500); Scheduler.AddDelayed(() => login?.Show(), 500);
loginDisplayed.Value = true; loginDisplayed.Value = true;
} }
} }
}
protected override void LogoSuspending(OsuLogo logo) protected override void LogoSuspending(OsuLogo logo)
{ {