Merge pull request #17880 from neelkarma/issue-17877

Show login prompt directly when attempting to enter multiplayer
This commit is contained in:
Dean Herbert 2022-04-20 13:58:57 +09:00 committed by GitHub
commit 27d4982a79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,6 @@ using osu.Game.Input.Bindings;
using osu.Game.Localisation;
using osu.Game.Online.API;
using osu.Game.Overlays;
using osu.Game.Overlays.Notifications;
using osuTK;
using osuTK.Graphics;
using osuTK.Input;
@ -117,9 +116,6 @@ namespace osu.Game.Screens.Menu
[Resolved]
private IAPIProvider api { get; set; }
[Resolved(CanBeNull = true)]
private INotificationOverlay notifications { get; set; }
[Resolved(CanBeNull = true)]
private LoginOverlay loginOverlay { get; set; }
@ -161,17 +157,7 @@ namespace osu.Game.Screens.Menu
{
if (api.State.Value != APIState.Online)
{
notifications?.Post(new SimpleNotification
{
Text = "You gotta be online to multi 'yo!",
Icon = FontAwesome.Solid.Globe,
Activated = () =>
{
loginOverlay?.Show();
return true;
}
});
loginOverlay?.Show();
return;
}
@ -182,17 +168,7 @@ namespace osu.Game.Screens.Menu
{
if (api.State.Value != APIState.Online)
{
notifications?.Post(new SimpleNotification
{
Text = "You gotta be online to view playlists 'yo!",
Icon = FontAwesome.Solid.Globe,
Activated = () =>
{
loginOverlay?.Show();
return true;
}
});
loginOverlay?.Show();
return;
}