mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:52:57 +08:00
Fix chat channel ids not being updated on room creation
This commit is contained in:
parent
00cdb3a44a
commit
ee076bbbe3
@ -124,6 +124,7 @@ namespace osu.Game.Online.Multiplayer
|
||||
if (other.Host.Value != null && Host.Value?.Id != other.Host.Value.Id)
|
||||
Host.Value = other.Host.Value;
|
||||
|
||||
ChannelId.Value = other.ChannelId.Value;
|
||||
Status.Value = other.Status.Value;
|
||||
Availability.Value = other.Availability.Value;
|
||||
Type.Value = other.Type.Value;
|
||||
|
@ -28,13 +28,15 @@ namespace osu.Game.Screens.Multi.Match.Components
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
roomId.BindValueChanged(_ => updateChannel(), true);
|
||||
channelId.BindValueChanged(_ => updateChannel(), true);
|
||||
}
|
||||
|
||||
private void updateChannel()
|
||||
{
|
||||
if (roomId.Value != null)
|
||||
Channel.Value = channelManager?.JoinChannel(new Channel { Id = channelId.Value, Type = ChannelType.Multiplayer, Name = $"#mp_{roomId.Value}" });
|
||||
if (roomId.Value == null || channelId.Value == 0)
|
||||
return;
|
||||
|
||||
Channel.Value = channelManager?.JoinChannel(new Channel { Id = channelId.Value, Type = ChannelType.Multiplayer, Name = $"#lazermp_{roomId.Value}" });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user