File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Flow.Launcher.Core/Plugin Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,12 @@ public static void LoadPlugins(PluginsSettings settings)
188188 AllPlugins = PluginsLoader . Plugins ( _metadatas , Settings ) ;
189189 // Since dotnet plugins need to get assembly name first, we should update plugin directory after loading plugins
190190 UpdatePluginDirectory ( _metadatas ) ;
191+ // Initialize plugin enumerable after all plugins are initialized
192+ _contextMenuPlugins = GetPluginsForInterface < IContextMenu > ( ) ;
193+ _homePlugins = GetPluginsForInterface < IAsyncHomeQuery > ( ) ;
194+ _resultUpdatePlugin = GetPluginsForInterface < IResultUpdated > ( ) ;
195+ _translationPlugins = GetPluginsForInterface < IPluginI18n > ( ) ;
196+ _hotkeyPlugins = GetPluginsForInterface < IPluginHotkey > ( ) ;
191197 }
192198
193199 private static void UpdatePluginDirectory ( List < PluginMetadata > metadatas )
@@ -257,11 +263,6 @@ public static async Task InitializePluginsAsync()
257263
258264 await Task . WhenAll ( InitTasks ) ;
259265
260- _contextMenuPlugins = GetPluginsForInterface < IContextMenu > ( ) ;
261- _homePlugins = GetPluginsForInterface < IAsyncHomeQuery > ( ) ;
262- _resultUpdatePlugin = GetPluginsForInterface < IResultUpdated > ( ) ;
263- _translationPlugins = GetPluginsForInterface < IPluginI18n > ( ) ;
264- _hotkeyPlugins = GetPluginsForInterface < IPluginHotkey > ( ) ;
265266 var pluginHotkeyInfo = GetPluginHotkeyInfo ( ) ;
266267 Settings . UpdatePluginHotkeyInfo ( pluginHotkeyInfo ) ;
267268 InitializeWindowPluginHotkeys ( pluginHotkeyInfo ) ;
You can’t perform that action at this time.
0 commit comments