diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index 23c77618f..377d36c48 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -127,11 +127,15 @@ namespace Flow.Launcher AbstractPluginEnvironment.PreStartPluginExecutablePathUpdate(_settings); + PluginManager.LoadPlugins(_settings.PluginSettings); + + // Register ResultsUpdated event after all plugins are loaded + Ioc.Default.GetRequiredService().RegisterResultsUpdatedEvent(); + + // Change language after all plugins are initialized // TODO: Clean InternationalizationManager.Instance and InternationalizationManager.Instance.GetTranslation in future Ioc.Default.GetRequiredService().ChangeLanguage(_settings.Language); - PluginManager.LoadPlugins(_settings.PluginSettings); - Http.Proxy = _settings.Proxy; await PluginManager.InitializePluginsAsync(); diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 46970a6a1..452222d93 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -168,7 +168,6 @@ namespace Flow.Launcher.ViewModel }; RegisterViewUpdate(); - RegisterResultsUpdatedEvent(); _ = RegisterClockAndDateUpdateAsync(); } @@ -213,7 +212,7 @@ namespace Flow.Launcher.ViewModel } } - private void RegisterResultsUpdatedEvent() + public void RegisterResultsUpdatedEvent() { foreach (var pair in PluginManager.GetPluginsForInterface()) {