1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 09:03:22 +08:00

Don't update mod filter visibility on every beatmap change

This commit is contained in:
Andrei Zavatski 2019-11-14 00:38:37 +03:00
parent 633c497602
commit 2d3fadc1a8

View File

@ -204,12 +204,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
{ {
scope.Value = BeatmapLeaderboardScope.Global; scope.Value = BeatmapLeaderboardScope.Global;
modSelector.DeselectAll(); modSelector.DeselectAll();
updateModFilterVisibility(); modFilter.FadeTo(api.IsLoggedIn && api.LocalUser.Value.IsSupporter ? 1 : 0);
}
private void updateModFilterVisibility()
{
modFilter.FadeTo(api.IsLoggedIn && api.LocalUser.Value.IsSupporter && !hasNoLeaderboard ? 1 : 0);
} }
private void getScores() private void getScores()
@ -219,9 +214,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
noScoresPlaceholder.FadeOut(duration, Easing.OutQuint); noScoresPlaceholder.FadeOut(duration, Easing.OutQuint);
updateModFilterVisibility(); if (Beatmap.Value?.OnlineBeatmapID.HasValue != true || Beatmap.Value.Status <= BeatmapSetOnlineStatus.Pending)
if (hasNoLeaderboard)
{ {
Scores = null; Scores = null;
content.Hide(); content.Hide();
@ -244,7 +237,5 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
}; };
api.Queue(getScoresRequest); api.Queue(getScoresRequest);
} }
private bool hasNoLeaderboard => Beatmap.Value?.OnlineBeatmapID.HasValue != true || Beatmap.Value.Status <= BeatmapSetOnlineStatus.Pending;
} }
} }