Fix
This commit is contained in:
parent
ed8640c23f
commit
e89566b61b
@ -54,7 +54,7 @@
|
|||||||
<MudTh>@Localizer["Rank"]</MudTh>
|
<MudTh>@Localizer["Rank"]</MudTh>
|
||||||
</HeaderContent>
|
</HeaderContent>
|
||||||
<RowTemplate>
|
<RowTemplate>
|
||||||
@if ( @context.Rank > 0 && @context.BestScore > 0)
|
@if (@context.Rank > 0 && @context.BestScore > 0)
|
||||||
{
|
{
|
||||||
<MudTd>@context.Rank</MudTd>
|
<MudTd>@context.Rank</MudTd>
|
||||||
<MudTd>
|
<MudTd>
|
||||||
|
@ -62,24 +62,15 @@ public partial class SongLeaderboardCard
|
|||||||
// set TotalPages
|
// set TotalPages
|
||||||
TotalPages = response.TotalPages;
|
TotalPages = response.TotalPages;
|
||||||
|
|
||||||
if (response.UserScore != null)
|
if (response.UserScore != null
|
||||||
|
&& LeaderboardScores.All(x => x.Baid != response.UserScore.Baid)
|
||||||
|
&& (LeaderboardScores.Count == 0 || response.UserScore.Rank >= LeaderboardScores[0].Rank))
|
||||||
{
|
{
|
||||||
// if baid isn't already in the LeaderboardScores, add it
|
LeaderboardScores.Add(new SongLeaderboard()); // Add an empty row
|
||||||
if (LeaderboardScores.All(x => x.Baid != response.UserScore.Baid))
|
LeaderboardScores.Add(response.UserScore);
|
||||||
{
|
|
||||||
LeaderboardScores.Add(new SongLeaderboard()); // Add an empty row
|
|
||||||
LeaderboardScores.Add(response.UserScore);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TotalRows = LeaderboardScores.Count;
|
TotalRows = LeaderboardScores.Count;
|
||||||
|
|
||||||
// log the LeaderboardScores
|
|
||||||
foreach (var score in LeaderboardScores)
|
|
||||||
{
|
|
||||||
Console.WriteLine(score.Rank + " " + score.Baid + " " + score.UserName + " " + score.BestScore + " " + score.BestRate + " " + score.BestCrown + " " + score.BestScoreRank);
|
|
||||||
}
|
|
||||||
|
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user