diff --git a/Flow.Launcher.Core/Plugin/PluginConfig.cs b/Flow.Launcher.Core/Plugin/PluginConfig.cs index 46f79c60cad..ea2119e60bc 100644 --- a/Flow.Launcher.Core/Plugin/PluginConfig.cs +++ b/Flow.Launcher.Core/Plugin/PluginConfig.cs @@ -20,7 +20,7 @@ internal abstract class PluginConfig public static List Parse(string[] pluginDirectories) { var allPluginMetadata = new List(); - var directories = pluginDirectories.SelectMany(Directory.GetDirectories); + var directories = pluginDirectories.SelectMany(Directory.EnumerateDirectories); // todo use linq when diable plugin is implmented since parallel.foreach + list is not thread saft foreach (var directory in directories) diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs index b889bb0d0ff..5bff0e182fc 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs @@ -18,22 +18,19 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, ISavabl private List cachedBookmarks = new List(); - private readonly Settings _settings; - private readonly PluginJsonStorage _storage; + private Settings _settings { get; set;} + private PluginJsonStorage _storage { get; set;} - public Main() + public void Init(PluginInitContext context) { + this.context = context; + _storage = new PluginJsonStorage(); _settings = _storage.Load(); cachedBookmarks = Bookmarks.LoadAllBookmarks(); } - public void Init(PluginInitContext context) - { - this.context = context; - } - public List Query(Query query) { string param = query.Search.TrimStart(); diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json index 62311f51458..e3ef792ecc8 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json @@ -4,7 +4,7 @@ "Name": "Browser Bookmarks", "Description": "Search your browser bookmarks", "Author": "qianlifeng, Ioannis G.", - "Version": "1.4.0", + "Version": "1.4.1", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.BrowserBookmark.dll", diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs b/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs index ab8ce892a7f..3c60bbf5a76 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Calculator/Main.cs @@ -24,7 +24,7 @@ public class Main : IPlugin, IPluginI18n, ISavable, ISettingProvider @"[ei]|[0-9]|[\+\-\*\/\^\., ""]|[\(\)\|\!\[\]]" + @")+$", RegexOptions.Compiled); private static readonly Regex RegBrackets = new Regex(@"[\(\)\[\]]", RegexOptions.Compiled); - private static readonly Engine MagesEngine; + private static Engine MagesEngine; private PluginInitContext Context { get; set; } private static Settings _settings; @@ -32,13 +32,7 @@ public class Main : IPlugin, IPluginI18n, ISavable, ISettingProvider static Main() { - MagesEngine = new Engine(new Configuration - { - Scope = new Dictionary - { - { "e", Math.E }, // e is not contained in the default mages engine - } - }); + } public void Init(PluginInitContext context) @@ -47,6 +41,14 @@ public void Init(PluginInitContext context) _viewModel = new SettingsViewModel(); _settings = _viewModel.Settings; + + MagesEngine = new Engine(new Configuration + { + Scope = new Dictionary + { + { "e", Math.E }, // e is not contained in the default mages engine + } + }); } public List Query(Query query) diff --git a/Plugins/Flow.Launcher.Plugin.Calculator/plugin.json b/Plugins/Flow.Launcher.Plugin.Calculator/plugin.json index 9bf532e8791..d37a1d28218 100644 --- a/Plugins/Flow.Launcher.Plugin.Calculator/plugin.json +++ b/Plugins/Flow.Launcher.Plugin.Calculator/plugin.json @@ -4,7 +4,7 @@ "Name": "Calculator", "Description": "Provide mathematical calculations.(Try 5*3-2 in Flow Launcher)", "Author": "cxfksword", - "Version": "1.1.5", + "Version": "1.1.6", "Language": "csharp", "Website": "https://github.com/Flow-Launcher/Flow.Launcher", "ExecuteFileName": "Flow.Launcher.Plugin.Caculator.dll",