diff --git a/Pal.Client/Commands/PalTestConnectionCommand.cs b/Pal.Client/Commands/PalTestConnectionCommand.cs index 0ad6e41..eb15b14 100644 --- a/Pal.Client/Commands/PalTestConnectionCommand.cs +++ b/Pal.Client/Commands/PalTestConnectionCommand.cs @@ -23,6 +23,7 @@ namespace Pal.Client.Commands private void Execute() { + _configWindow.IsOpen = true; var _ = new TickScheduler(() => _configWindow.TestConnection()); } } diff --git a/Pal.Client/Plugin.cs b/Pal.Client/Plugin.cs index 7a064b7..09a3d0e 100644 --- a/Pal.Client/Plugin.cs +++ b/Pal.Client/Plugin.cs @@ -13,6 +13,7 @@ using Dalamud.Game.Command; using Dalamud.Game.Gui; using Pal.Client.Properties; using ECommons; +using ECommons.DalamudServices; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Pal.Client.Commands; @@ -66,6 +67,10 @@ namespace Pal.Client HelpMessage = Localization.Command_pal_HelpText }); + // Using TickScheduler requires ECommons to at least be partially initialized + // ECommonsMain.Dispose leaves this untouched. + Svc.Init(pluginInterface); + Task.Run(async () => await CreateDependencyContext()); }