1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:07:25 +08:00

Fix gameplay leaderboard showing "-" on non-tracked scores

This commit is contained in:
Salman Ahmed 2023-01-06 11:58:38 +03:00
parent b34ffb4e9c
commit 408356d05e
2 changed files with 6 additions and 6 deletions

View File

@ -171,13 +171,13 @@ namespace osu.Game.Screens.Play.HUD
for (int i = 0; i < Flow.Count; i++)
{
Flow.SetLayoutPosition(orderedByScore[i], i);
orderedByScore[i].ScorePosition = CheckValidScorePosition(i + 1) ? i + 1 : null;
orderedByScore[i].ScorePosition = CheckValidScorePosition(orderedByScore[i], i + 1) ? i + 1 : null;
}
sorting.Validate();
}
protected virtual bool CheckValidScorePosition(int i) => true;
protected virtual bool CheckValidScorePosition(GameplayLeaderboardScore score, int position) => true;
private partial class InputDisabledScrollContainer : OsuScrollContainer
{

View File

@ -100,16 +100,16 @@ namespace osu.Game.Screens.Play.HUD
local.DisplayOrder.Value = long.MaxValue;
}
protected override bool CheckValidScorePosition(int i)
protected override bool CheckValidScorePosition(GameplayLeaderboardScore score, int position)
{
// change displayed position to '-' when there are 50 already submitted scores and tracked score is last
if (scoreSource.Value != PlayBeatmapDetailArea.TabType.Local)
if (score.Tracked && scoreSource.Value != PlayBeatmapDetailArea.TabType.Local)
{
if (i == Flow.Count && Flow.Count > GetScoresRequest.MAX_SCORES_PER_REQUEST)
if (position == Flow.Count && Flow.Count > GetScoresRequest.MAX_SCORES_PER_REQUEST)
return false;
}
return base.CheckValidScorePosition(i);
return base.CheckValidScorePosition(score, position);
}
private void updateVisibility() =>