Skip to content

Commit

Permalink
Whiteespace?
Browse files Browse the repository at this point in the history
  • Loading branch information
Bod9001 committed Oct 29, 2023
1 parent 77f0c26 commit 0393d3f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions UnitystationLauncher/ViewModels/ServersPanelViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public class ServersPanelViewModel : PanelBase
private readonly IPingService _pingService;
private readonly IServerService _serverService;

public ServersPanelViewModel(IInstallationService installationService, IPingService pingService, IServerService serverService)
public ServersPanelViewModel(IInstallationService installationService, IPingService pingService,
IServerService serverService)
{
_installationService = installationService;
_pingService = pingService;
Expand All @@ -55,10 +56,8 @@ private void InitializeServersList()
Log.Information("Scheduling periodic refresh for servers list...");

// Why can you not just run async methods with this?? Instead we have to do this ugly thing
RxApp.TaskpoolScheduler.SchedulePeriodic(_refreshInterval, () =>
{
RxApp.MainThreadScheduler.ScheduleAsync((_, _) => RefreshServersList());
});
RxApp.TaskpoolScheduler.SchedulePeriodic(_refreshInterval,
() => { RxApp.MainThreadScheduler.ScheduleAsync((_, _) => RefreshServersList()); });
}

private async Task RefreshServersList()
Expand Down Expand Up @@ -119,15 +118,15 @@ private void RemoveDeletedServers(List<Server> servers)
private async Task DownloadServer(Server server)
{
(Download? download, string downloadFailReason) = await _installationService.DownloadInstallation(server);

if (download == null)
{
MessageBoxBuilder.CreateMessageBox(MessageBoxButtons.Ok, "Problem downloading server",

Check warning on line 124 in UnitystationLauncher/ViewModels/ServersPanelViewModel.cs

View workflow job for this annotation

GitHub Actions / Build Windows

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.

Check warning on line 124 in UnitystationLauncher/ViewModels/ServersPanelViewModel.cs

View workflow job for this annotation

GitHub Actions / Build Linux

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.

Check warning on line 124 in UnitystationLauncher/ViewModels/ServersPanelViewModel.cs

View workflow job for this annotation

GitHub Actions / Build MacOS

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.

Check warning on line 124 in UnitystationLauncher/ViewModels/ServersPanelViewModel.cs

View workflow job for this annotation

GitHub Actions / Build Linux Flatpak

Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.
downloadFailReason).Show();
return;
}

foreach (ServerViewModel viewModel in
foreach (ServerViewModel viewModel in
ServerViews.Where(viewModel => viewModel.Server.ForkName == download.ForkName
&& viewModel.Server.BuildVersion == download.BuildVersion))
{
Expand All @@ -148,4 +147,4 @@ public override void Refresh()
viewModel.Refresh();
}
}
}
}

0 comments on commit 0393d3f

Please sign in to comment.