get rid of keen threading cringe
All checks were successful
Build / Build Launcher (push) Successful in 2m39s
All checks were successful
Build / Build Launcher (push) Successful in 2m39s
This commit is contained in:
@@ -16,7 +16,6 @@ using VRage.Input;
|
||||
using VRage.Utils;
|
||||
using VRageMath;
|
||||
using static Sandbox.Graphics.GUI.MyGuiScreenMessageBox;
|
||||
using Parallel = ParallelTasks.Parallel;
|
||||
|
||||
namespace PluginLoader.GUI;
|
||||
|
||||
@@ -122,13 +121,12 @@ public class MyGuiScreenPluginConfig : MyGuiScreenBase
|
||||
|
||||
private void DownloadStats()
|
||||
{
|
||||
LogFile.Log.Debug("Downloading user statistics", false);
|
||||
Parallel.Start(() => { PluginStats = StatsClient.DownloadStats(); }, OnDownloadedStats);
|
||||
}
|
||||
|
||||
private void OnDownloadedStats()
|
||||
{
|
||||
pluginDetails?.LoadPluginData();
|
||||
LogFile.Log.Debug("Downloading user statistics");
|
||||
Task.Run(() =>
|
||||
{
|
||||
StatsClient.DownloadStats();
|
||||
pluginDetails?.LoadPluginData();
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user