Skip to content

Commit 2054e61

Browse files
authored
Merge branch 'Flow-Launcher:dev' into ishmaeel_2882
2 parents 1e71830 + b0228e0 commit 2054e61

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Flow.Launcher.Core.ExternalPlugins;
1+
using Flow.Launcher.Core.ExternalPlugins;
22
using System;
33
using System.Collections.Concurrent;
44
using 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)

Flow.Launcher.Core/Resource/Internationalization.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ Or download the [early access version](https://github.com/Flow-Launcher/Prerelea
350350
<a href="https://github.com/itsonlyfrans"><img src="https://avatars.githubusercontent.com/u/46535667?v=4" width="10%" /></a>
351351
<a href="https://github.com/andreqramos"><img src="https://avatars.githubusercontent.com/u/49326063?v=4" width="10%" /></a>
352352
<a href="https://github.com/Yuba4"><img src="https://avatars.githubusercontent.com/u/46278200?v=4" width="10%" /></a>
353+
<a href="https://github.com/tikkatek"><img src="https://avatars.githubusercontent.com/u/26571381?v=4" width="10%" /></a>
353354
<a href="https://github.com/patrickdobler"><img src="https://avatars.githubusercontent.com/u/16536946?v=4" width="10%" /></a>
354355
<a href="https://github.com/benflap"><img src="https://avatars.githubusercontent.com/u/62034481?v=4" width="10%" /></a>
355356
</p>

0 commit comments

Comments
 (0)