Skip to content

Commit

Permalink
Fix mobile release dialog obstructed by the software keyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzibyte committed Jan 4, 2025
1 parent b469885 commit 3fc86f6
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions osu.Game/Screens/Menu/MainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,15 +297,6 @@ protected override void LogoArriving(OsuLogo logo, bool resuming)

private bool onLogoClick(Func<bool> originalAction)
{
if (!api.IsLoggedIn || api.State.Value == APIState.RequiresSecondFactorAuth)
{
if (!loginDisplayed.Value)
{
Scheduler.AddDelayed(() => login?.Show(), 500);
loginDisplayed.Value = true;
}
}

if (showMobileDisclaimer.Value)
{
mobileDisclaimerSchedule?.Cancel();
Expand All @@ -314,13 +305,28 @@ private bool onLogoClick(Func<bool> originalAction)
dialogOverlay.Push(new MobileDisclaimerDialog(() =>
{
showMobileDisclaimer.Value = false;
displayLoginIfApplicable();
}));
}, 500);
}
else
displayLoginIfApplicable();

return originalAction.Invoke();
}

private void displayLoginIfApplicable()
{
if (!api.IsLoggedIn || api.State.Value == APIState.RequiresSecondFactorAuth)
{
if (!loginDisplayed.Value)
{
Scheduler.AddDelayed(() => login?.Show(), 500);
loginDisplayed.Value = true;
}
}
}

protected override void LogoSuspending(OsuLogo logo)
{
var seq = logo.FadeOut(300, Easing.InSine)
Expand Down

0 comments on commit 3fc86f6

Please sign in to comment.