File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1- using Flow . Launcher . Core . ExternalPlugins ;
1+ using Flow . Launcher . Core . ExternalPlugins ;
22using System ;
33using System . Collections . Concurrent ;
44using System . Collections . Generic ;
@@ -308,7 +308,8 @@ public static PluginPair GetPluginForId(string id)
308308
309309 public static IEnumerable < PluginPair > GetPluginsForInterface < T > ( ) where T : IFeatures
310310 {
311- return AllPlugins . Where ( p => p . Plugin is T ) ;
311+ // Handle scenario where this is called before all plugins are instantiated, e.g. language change on startup
312+ return AllPlugins ? . Where ( p => p . Plugin is T ) ?? Array . Empty < PluginPair > ( ) ;
312313 }
313314
314315 public static List < Result > GetContextMenusForPlugin ( Result result )
Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ internal void AddPluginLanguageDirectories(IEnumerable<PluginPair> plugins)
5858
5959 private void LoadDefaultLanguage ( )
6060 {
61+ // Removes language files loaded before any plugins were loaded.
62+ // Prevents the language Flow started in from overwriting English if the user switches back to English
63+ RemoveOldLanguageFiles ( ) ;
6164 LoadLanguage ( AvailableLanguages . English ) ;
6265 _oldResources . Clear ( ) ;
6366 }
You can’t perform that action at this time.
0 commit comments