1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:52:55 +08:00

Tidy up event flow of change settings call

This commit is contained in:
Dean Herbert 2020-12-23 22:39:14 +09:00
parent c5692a5d6a
commit 4296f61d6c

View File

@ -369,7 +369,6 @@ namespace osu.Game.Online.RealtimeMultiplayer
if (Room == null)
return;
// Update a few properties of the room instantaneously.
Schedule(() =>
{
if (Room == null)
@ -377,6 +376,7 @@ namespace osu.Game.Online.RealtimeMultiplayer
Debug.Assert(apiRoom != null);
// Update a few properties of the room instantaneously.
Room.Settings = settings;
apiRoom.Name.Value = Room.Settings.Name;
@ -385,12 +385,12 @@ namespace osu.Game.Online.RealtimeMultiplayer
apiRoom.Playlist.Clear();
RoomChanged?.Invoke();
});
var req = new GetBeatmapSetRequest(settings.BeatmapID, BeatmapSetLookupType.BeatmapId);
req.Success += res => updatePlaylist(settings, res);
api.Queue(req);
});
}
private void updatePlaylist(MultiplayerRoomSettings settings, APIBeatmapSet onlineSet)