mirror of https://github.com/ppy/osu
Fix room inspector cover not resetting when no room selected
This commit is contained in:
parent
3a7d09d6f2
commit
59f7c5a26e
|
@ -93,10 +93,14 @@ public ParticipantInfo()
|
||||||
Host.BindValueChanged(v =>
|
Host.BindValueChanged(v =>
|
||||||
{
|
{
|
||||||
hostText.Clear();
|
hostText.Clear();
|
||||||
|
flagContainer.Clear();
|
||||||
|
|
||||||
|
if (v != null)
|
||||||
|
{
|
||||||
hostText.AddText("hosted by ");
|
hostText.AddText("hosted by ");
|
||||||
hostText.AddLink(v.Username, null, LinkAction.OpenUserProfile, v.Id.ToString(), "Open profile", s => s.Font = "Exo2.0-BoldItalic");
|
hostText.AddLink(v.Username, null, LinkAction.OpenUserProfile, v.Id.ToString(), "Open profile", s => s.Font = "Exo2.0-BoldItalic");
|
||||||
|
|
||||||
flagContainer.Child = new DrawableFlag(v.Country) { RelativeSizeAxes = Axes.Both };
|
flagContainer.Child = new DrawableFlag(v.Country) { RelativeSizeAxes = Axes.Both };
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ParticipantCount.BindValueChanged(v => summary.Text = $"{v:#,0}{" participant".Pluralize(v == 1)}");
|
ParticipantCount.BindValueChanged(v => summary.Text = $"{v:#,0}{" participant".Pluralize(v == 1)}");
|
||||||
|
|
|
@ -53,10 +53,8 @@ public Room Room
|
||||||
Duration.UnbindFrom(room.Duration);
|
Duration.UnbindFrom(room.Duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
room = value;
|
room = value ?? new Room();
|
||||||
|
|
||||||
if (room != null)
|
|
||||||
{
|
|
||||||
RoomID.BindTo(room.RoomID);
|
RoomID.BindTo(room.RoomID);
|
||||||
Name.BindTo(room.Name);
|
Name.BindTo(room.Name);
|
||||||
Host.BindTo(room.Host);
|
Host.BindTo(room.Host);
|
||||||
|
@ -71,7 +69,6 @@ public Room Room
|
||||||
Duration.BindTo(room.Duration);
|
Duration.BindTo(room.Duration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void updatePlaylist()
|
private void updatePlaylist()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue