1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Clarify guard condition in RoomSubScreen

This commit is contained in:
Dean Herbert 2023-07-19 19:39:10 +09:00
parent 18aace177a
commit e47722565a

View File

@ -365,7 +365,9 @@ namespace osu.Game.Screens.OnlinePlay.Match
if (!IsConnected)
return true;
if (dialogOverlay == null || Room.RoomID.Value != null || Room.Playlist.Count == 0)
bool hasUnsavedChanges = Room.RoomID.Value == null && Room.Playlist.Count > 0;
if (dialogOverlay == null || !hasUnsavedChanges)
return true;
// if the dialog is already displayed, block exiting until the user explicitly makes a decision.