mirror of
https://github.com/ppy/osu
synced 2024-12-15 11:25:29 +00:00
Use UnbindFrom()
This commit is contained in:
parent
41c7d10dff
commit
be3a912d0b
@ -54,19 +54,24 @@ namespace osu.Game.Screens.Multi.Components
|
||||
private Room room;
|
||||
public Room Room
|
||||
{
|
||||
get { return room; }
|
||||
get => room;
|
||||
set
|
||||
{
|
||||
if (value == room) return;
|
||||
room = value;
|
||||
if (value == room)
|
||||
return;
|
||||
|
||||
nameBind.UnbindBindings();
|
||||
hostBind.UnbindBindings();
|
||||
statusBind.UnbindBindings();
|
||||
typeBind.UnbindBindings();
|
||||
beatmapBind.UnbindBindings();
|
||||
maxParticipantsBind.UnbindBindings();
|
||||
participantsBind.UnbindBindings();
|
||||
if (room != null)
|
||||
{
|
||||
nameBind.UnbindFrom(room.Name);
|
||||
hostBind.UnbindFrom(room.Host);
|
||||
statusBind.UnbindFrom(room.Status);
|
||||
typeBind.UnbindFrom(room.Type);
|
||||
beatmapBind.UnbindFrom(room.Beatmap);
|
||||
maxParticipantsBind.UnbindFrom(room.MaxParticipants);
|
||||
participantsBind.UnbindFrom(room.Participants);
|
||||
}
|
||||
|
||||
room = value;
|
||||
|
||||
if (room != null)
|
||||
{
|
||||
|
@ -190,12 +190,15 @@ namespace osu.Game.Screens.Multi.Components
|
||||
if (room == value)
|
||||
return;
|
||||
|
||||
room = value;
|
||||
if (room != null)
|
||||
{
|
||||
nameBind.UnbindFrom(room.Name);
|
||||
availabilityBind.UnbindFrom(room.Availability);
|
||||
typeBind.UnbindFrom(room.Type);
|
||||
maxParticipantsBind.UnbindFrom(room.MaxParticipants);
|
||||
}
|
||||
|
||||
nameBind.UnbindBindings();
|
||||
availabilityBind.UnbindBindings();
|
||||
typeBind.UnbindBindings();
|
||||
maxParticipantsBind.UnbindBindings();
|
||||
room = value;
|
||||
|
||||
if (room != null)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user