Add local score after existing scores to avoid initial re-sort

This commit is contained in:
Dean Herbert 2022-09-21 13:38:40 +09:00
parent 68c040175a
commit a8338c4efd
1 changed files with 9 additions and 9 deletions

View File

@ -45,15 +45,6 @@ private void showScores()
if (!Scores.Any())
return;
ILeaderboardScore local = Add(trackingUser, true);
local.TotalScore.BindTarget = scoreProcessor.TotalScore;
local.Accuracy.BindTarget = scoreProcessor.Accuracy;
local.Combo.BindTarget = scoreProcessor.Combo;
// Local score should always show lower than any existing scores in cases of ties.
local.DisplayOrder.Value = long.MaxValue;
foreach (var s in Scores)
{
var score = Add(s.User, false);
@ -68,6 +59,15 @@ private void showScores()
score.Combo.Value = s.MaxCombo;
score.DisplayOrder.Value = s.OnlineID > 0 ? s.OnlineID : s.Date.ToUnixTimeSeconds();
}
ILeaderboardScore local = Add(trackingUser, true);
local.TotalScore.BindTarget = scoreProcessor.TotalScore;
local.Accuracy.BindTarget = scoreProcessor.Accuracy;
local.Combo.BindTarget = scoreProcessor.Combo;
// Local score should always show lower than any existing scores in cases of ties.
local.DisplayOrder.Value = long.MaxValue;
}
}
}