mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 09:32:55 +08:00
Merge pull request #22043 from frenzibyte/fix-solo-leaderboard-hyphen
Fix gameplay leaderboard showing "-" on non-tracked scores
This commit is contained in:
commit
938658649e
@ -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
|
||||
{
|
||||
|
@ -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() =>
|
||||
|
Loading…
Reference in New Issue
Block a user