diff --git a/osu.Game/Online/Multiplayer/Room.cs b/osu.Game/Online/Multiplayer/Room.cs index 71668e4c4b..6dae9d2d74 100644 --- a/osu.Game/Online/Multiplayer/Room.cs +++ b/osu.Game/Online/Multiplayer/Room.cs @@ -14,7 +14,7 @@ namespace osu.Game.Online.Multiplayer { public class Room { - public Bindable RoomID { get; } = new Bindable(); + public Bindable RoomID { get; } = new Bindable(); [JsonProperty("name")] public readonly Bindable Name = new Bindable("My awesome room!"); @@ -34,6 +34,7 @@ namespace osu.Game.Online.Multiplayer public void CopyFrom(Room other) { + RoomID.Value = other.RoomID; Name.Value = other.Name; Host.Value = other.Host; Status.Value = other.Status; @@ -43,8 +44,6 @@ namespace osu.Game.Online.Multiplayer MaxParticipants.Value = other.MaxParticipants; Participants.Value = other.Participants.Value.ToArray(); } - - public Bindable Created = new Bindable(); } public class PlaylistItem diff --git a/osu.Game/Screens/Multi/Match/Components/Header.cs b/osu.Game/Screens/Multi/Match/Components/Header.cs index 9c72403806..b5ae3baa15 100644 --- a/osu.Game/Screens/Multi/Match/Components/Header.cs +++ b/osu.Game/Screens/Multi/Match/Components/Header.cs @@ -100,7 +100,7 @@ namespace osu.Game.Screens.Multi.Match.Components private class BeatmapSelectButton : TriangleButton { - private readonly IBindable createdBind = new Bindable(); + private readonly IBindable roomIDBind = new Bindable(); [Resolved] private Room room { get; set; } @@ -113,8 +113,8 @@ namespace osu.Game.Screens.Multi.Match.Components [BackgroundDependencyLoader] private void load() { - createdBind.BindTo(room.Created); - createdBind.BindValueChanged(v => Enabled.Value = !v, true); + roomIDBind.BindTo(room.RoomID); + roomIDBind.BindValueChanged(v => Enabled.Value = !v.HasValue, true); } } diff --git a/osu.Game/Screens/Multi/Match/Components/MatchTabControl.cs b/osu.Game/Screens/Multi/Match/Components/MatchTabControl.cs index 51698fa50f..fa760c97e3 100644 --- a/osu.Game/Screens/Multi/Match/Components/MatchTabControl.cs +++ b/osu.Game/Screens/Multi/Match/Components/MatchTabControl.cs @@ -14,7 +14,7 @@ namespace osu.Game.Screens.Multi.Match.Components { public class MatchTabControl : PageTabControl { - private readonly IBindable created = new Bindable(); + private readonly IBindable roomIdBind = new Bindable(); [Resolved] private Room room { get; set; } @@ -28,10 +28,10 @@ namespace osu.Game.Screens.Multi.Match.Components [BackgroundDependencyLoader] private void load() { - created.BindTo(room.Created); - created.BindValueChanged(v => + roomIdBind.BindTo(room.RoomID); + roomIdBind.BindValueChanged(v => { - if (v) + if (v.HasValue) { Items.ForEach(t => t.Enabled.Value = !(t is SettingsMatchPage)); Current.Value = new RoomMatchPage(); diff --git a/osu.Game/Screens/Multi/RoomManager.cs b/osu.Game/Screens/Multi/RoomManager.cs index 9e233f278b..e2d132b8bb 100644 --- a/osu.Game/Screens/Multi/RoomManager.cs +++ b/osu.Game/Screens/Multi/RoomManager.cs @@ -25,7 +25,6 @@ namespace osu.Game.Screens.Multi // Todo: Perform API request - room.Created.Value = true; rooms.Add(room); } }