From 2d3fadc1a8d21ed1895db93542bec2b597a50645 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Thu, 14 Nov 2019 00:38:37 +0300 Subject: [PATCH] Don't update mod filter visibility on every beatmap change --- .../Overlays/BeatmapSet/Scores/ScoresContainer.cs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs b/osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs index 32e5314fba..3e3f823368 100644 --- a/osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs +++ b/osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs @@ -204,12 +204,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores { scope.Value = BeatmapLeaderboardScope.Global; modSelector.DeselectAll(); - updateModFilterVisibility(); - } - - private void updateModFilterVisibility() - { - modFilter.FadeTo(api.IsLoggedIn && api.LocalUser.Value.IsSupporter && !hasNoLeaderboard ? 1 : 0); + modFilter.FadeTo(api.IsLoggedIn && api.LocalUser.Value.IsSupporter ? 1 : 0); } private void getScores() @@ -219,9 +214,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores noScoresPlaceholder.FadeOut(duration, Easing.OutQuint); - updateModFilterVisibility(); - - if (hasNoLeaderboard) + if (Beatmap.Value?.OnlineBeatmapID.HasValue != true || Beatmap.Value.Status <= BeatmapSetOnlineStatus.Pending) { Scores = null; content.Hide(); @@ -244,7 +237,5 @@ namespace osu.Game.Overlays.BeatmapSet.Scores }; api.Queue(getScoresRequest); } - - private bool hasNoLeaderboard => Beatmap.Value?.OnlineBeatmapID.HasValue != true || Beatmap.Value.Status <= BeatmapSetOnlineStatus.Pending; } }