Skip to content

Commit

Permalink
Merge pull request #31414 from frenzibyte/fix-display
Browse files Browse the repository at this point in the history
Fix mobile release dialog obstructed by the software keyboard
  • Loading branch information
peppy authored Jan 4, 2025
2 parents b469885 + 37da72d commit d6e73d7
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 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,27 @@ private bool onLogoClick(Func<bool> originalAction)
dialogOverlay.Push(new MobileDisclaimerDialog(() =>
{
showMobileDisclaimer.Value = false;
displayLoginIfApplicable();
}));
}, 500);
}
else
displayLoginIfApplicable();

return originalAction.Invoke();
}

private void displayLoginIfApplicable()
{
if (loginDisplayed.Value) return;

if (!api.IsLoggedIn || api.State.Value == APIState.RequiresSecondFactorAuth)
{
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 d6e73d7

Please sign in to comment.