Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qubqub committed Nov 10, 2023
1 parent fa665f1 commit ac3ba0d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Views/LeaderboardDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,20 @@ private void cboRoundList_SelectedIndexChanged(object sender, EventArgs e) {
Task.Run(() => this.DataLoad(this.key)).ContinueWith(prevTask => {
this.BeginInvoke((MethodInvoker)delegate {
if (prevTask.Result) {
this.Text = $@" {Multilingual.GetWord("leaderboard_menu_title")} - {((ImageItem)((ImageComboBox)sender).SelectedItem).Text}";
this.mpsSpinner.Visible = false;
this.gridDetails.DataSource = this.recordholders;
this.lblTotalPlayers.Text = $"{Multilingual.GetWord("leaderboard_total_players_prefix")}{this.totalRank}{Multilingual.GetWord("leaderboard_total_players_suffix")}";
this.lblTotalPlayers.Visible = true;
this.mlVisitFallalytics.Visible = true;
this.Refresh();
} else {
this.Text = $@" {Multilingual.GetWord("leaderboard_menu_title")}";
this.mpsSpinner.Visible = false;
this.gridDetails.DataSource = this.nodata;
this.lblTotalPlayers.Visible = false;
this.mlVisitFallalytics.Visible = false;
this.Refresh();
}
});
});
Expand Down Expand Up @@ -181,7 +185,6 @@ private bool DataLoad(string round = null) {
options.Converters.Add(new RoundConverter());
var availableRound = JsonSerializer.Deserialize<AvailableRound>(json, options);
result = availableRound.found;
Console.WriteLine(result);
this.roundlist = availableRound.leaderboards;
} else {
string json = web.DownloadString($"{this.LEADERBOARD_API_URL}?round={round}");
Expand Down

0 comments on commit ac3ba0d

Please sign in to comment.