Show room leaderboard instead in the lounge

This commit is contained in:
smoogipoo
2019-01-08 19:24:55 +09:00
parent 2ecbb23b63
commit 122fc2de58
6 changed files with 25 additions and 31 deletions

View File

@ -16,17 +16,18 @@ namespace osu.Game.Screens.Multi.Match.Components
{
public Action<IEnumerable<APIRoomScoreInfo>> ScoresLoaded;
private readonly Room room;
public MatchLeaderboard(Room room)
public Room Room
{
this.room = room;
get => bindings.Room;
set => bindings.Room = value;
}
private readonly RoomBindings bindings = new RoomBindings();
[BackgroundDependencyLoader]
private void load()
{
room.RoomID.BindValueChanged(id =>
bindings.RoomID.BindValueChanged(id =>
{
if (id == null)
return;
@ -38,10 +39,10 @@ namespace osu.Game.Screens.Multi.Match.Components
protected override APIRequest FetchScores(Action<IEnumerable<APIRoomScoreInfo>> scoresCallback)
{
if (room.RoomID == null)
if (bindings.RoomID.Value == null)
return null;
var req = new GetRoomScoresRequest(room.RoomID.Value ?? 0);
var req = new GetRoomScoresRequest(bindings.RoomID.Value ?? 0);
req.Success += r =>
{