1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-28 00:43:01 +08:00

Disallow entering the playlists/multiplayer screens if API is failing

This commit is contained in:
Dean Herbert 2020-12-29 16:25:51 +09:00
parent d155f2c0e9
commit 4d04e0dee7

View File

@ -156,7 +156,7 @@ namespace osu.Game.Screens.Menu
private void onMultiplayer()
{
if (!api.IsLoggedIn)
if (!api.IsLoggedIn || api.State.Value != APIState.Online)
{
notifications?.Post(new SimpleNotification
{
@ -177,11 +177,11 @@ namespace osu.Game.Screens.Menu
private void onPlaylists()
{
if (!api.IsLoggedIn)
if (!api.IsLoggedIn || api.State.Value != APIState.Online)
{
notifications?.Post(new SimpleNotification
{
Text = "You gotta be logged in to multi 'yo!",
Text = "You gotta be logged in to view playlists 'yo!",
Icon = FontAwesome.Solid.Globe,
Activated = () =>
{