mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 03:07:19 +08:00
Fix password in a better way
This commit is contained in:
parent
c4a42c4db0
commit
1e282432c9
@ -60,7 +60,8 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
|||||||
AddOrUpdateRoom(result);
|
AddOrUpdateRoom(result);
|
||||||
room.CopyFrom(result); // Also copy back to the source model, since this is likely to have been stored elsewhere.
|
room.CopyFrom(result); // Also copy back to the source model, since this is likely to have been stored elsewhere.
|
||||||
|
|
||||||
onSuccess?.Invoke(result);
|
// The server may not contain all properties (such as password), so invoke success with the given room.
|
||||||
|
onSuccess?.Invoke(room);
|
||||||
};
|
};
|
||||||
|
|
||||||
req.Failure += exception =>
|
req.Failure += exception =>
|
||||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
private MultiplayerClient multiplayerClient { get; set; }
|
private MultiplayerClient multiplayerClient { get; set; }
|
||||||
|
|
||||||
public override void CreateRoom(Room room, Action<Room> onSuccess = null, Action<string> onError = null)
|
public override void CreateRoom(Room room, Action<Room> onSuccess = null, Action<string> onError = null)
|
||||||
=> base.CreateRoom(room, r => joinMultiplayerRoom(r, room.Password.Value, onSuccess, onError), onError);
|
=> base.CreateRoom(room, r => joinMultiplayerRoom(r, r.Password.Value, onSuccess, onError), onError);
|
||||||
|
|
||||||
public override void JoinRoom(Room room, string password = null, Action<Room> onSuccess = null, Action<string> onError = null)
|
public override void JoinRoom(Room room, string password = null, Action<Room> onSuccess = null, Action<string> onError = null)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user