Skip to content

Commit

Permalink
Fix leaderboard order (#2988)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackYps authored Jun 10, 2023
1 parent 329c775 commit 5f65e3a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ public void initialize() {
controller.setSeason(season);
controller.getRoot()
.setText(i18n.getOrDefault(league.getTechnicalName(), String.format("leaderboard.%s", league.getTechnicalName())));
controller.getRoot().setUserData(league.getId());
controller.getRoot().setUserData(league.getTechnicalName());
fxApplicationThreadExecutor.execute(() -> leaderboardRoot.getTabs().add(controller.getRoot()));
controllers.add(controller);
}).thenRunAsync(() -> {
leaderboardRoot.getTabs().sort(Comparator.comparing(tab -> (int) tab.getUserData()));
leaderboardRoot.getTabs().sort(Comparator.comparing(tab -> tab.getUserData().toString()));
leaderboardRoot.getSelectionModel().select(0);
lastTab = leaderboardRoot.getTabs().get(0);
}, fxApplicationThreadExecutor).exceptionally(throwable -> {
Expand Down

0 comments on commit 5f65e3a

Please sign in to comment.