mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:13:21 +08:00
Clarify guard condition in RoomSubScreen
This commit is contained in:
parent
18aace177a
commit
e47722565a
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user