From 633c497602db249d5113eb2e35a725f1a53fff3d Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Wed, 13 Nov 2019 17:36:08 +0300 Subject: [PATCH] Hide content if beatmap has no leaderboard --- osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs b/osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs index bc950a0c0c..32e5314fba 100644 --- a/osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs +++ b/osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs @@ -37,6 +37,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores private readonly FillFlowContainer modFilter; private readonly LeaderboardModSelector modSelector; private readonly NoScoresPlaceholder noScoresPlaceholder; + private readonly FillFlowContainer content; [Resolved] private IAPIProvider api { get; set; } @@ -82,7 +83,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores { RelativeSizeAxes = Axes.Both, }, - new FillFlowContainer + content = new FillFlowContainer { Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, @@ -223,9 +224,11 @@ namespace osu.Game.Overlays.BeatmapSet.Scores if (hasNoLeaderboard) { Scores = null; + content.Hide(); return; } + content.Show(); loading.Show(); getScoresRequest = new GetScoresRequest(Beatmap.Value, Beatmap.Value.Ruleset, scope.Value, modSelector.SelectedMods); getScoresRequest.Success += scores =>