1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-15 15:27:20 +08:00

Refactorings

This commit is contained in:
smoogipoo 2021-08-13 22:08:34 +09:00
parent d57508853e
commit 155e9e16a5
2 changed files with 13 additions and 1 deletions

View File

@ -23,10 +23,22 @@ namespace osu.Game.Screens.OnlinePlay
/// </summary>
IBindableList<Room> Rooms { get; }
/// <summary>
/// Adds a <see cref="Room"/> to this <see cref="IRoomManager"/>.
/// If already existing, the local room will be updated with the given one.
/// </summary>
/// <param name="room">The incoming <see cref="Room"/>.</param>
void AddOrUpdateRoom(Room room);
/// <summary>
/// Removes a <see cref="Room"/> from this <see cref="IRoomManager"/>.
/// </summary>
/// <param name="room">The <see cref="Room"/> to remove.</param>
void RemoveRoom(Room room);
/// <summary>
/// Removes all <see cref="Room"/>s from this <see cref="IRoomManager"/>.
/// </summary>
void ClearRooms();
/// <summary>

View File

@ -43,7 +43,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
base.OnResuming(last);
// Upon having left a room, we don't know whether we were the only participant, and whether the room is now closed as a result of leaving it.
// To work around this, temporarily clear all rooms until the next listing poll.
// To work around this, temporarily remove the room and trigger an immediate listing poll.
if (last is MultiplayerMatchSubScreen match)
{
RoomManager.RemoveRoom(match.Room);