Skip to content

Commit

Permalink
fix(leaderboardinfo): don't ignore display names for local user
Browse files Browse the repository at this point in the history
  • Loading branch information
wescopeland committed Feb 7, 2025
1 parent c596ee0 commit 8cbf123
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions resources/views/pages-legacy/leaderboardinfo.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
abort(404);
}
$lbData = GetLeaderboardData($leaderboard, Auth::user(), $count, $offset);
$userModel = Auth::user();
$lbData = GetLeaderboardData($leaderboard, $userModel, $count, $offset);
$numEntries = is_countable($lbData['Entries']) ? count($lbData['Entries']) : 0;
$totalEntries = $leaderboard->entries()->count();
Expand Down Expand Up @@ -210,7 +211,7 @@
$nextSubmitAt = $nextEntry['DateSubmitted'];
$nextSubmitAtNice = getNiceDate($nextSubmitAt);
$isLocal = (strcmp($nextUser, $user) == 0);
$isLocal = $nextUser === $userModel->display_name;
$lastEntry = ($resultsDrawn + 1 == $numEntries);
$userAppendedInResults = ($numEntries > $count);
Expand Down

0 comments on commit 8cbf123

Please sign in to comment.