Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Flow.Launcher.Core/Plugin/PluginConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ internal abstract class PluginConfig
public static List<PluginMetadata> Parse(string[] pluginDirectories)
{
var allPluginMetadata = new List<PluginMetadata>();
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)
Expand Down
13 changes: 5 additions & 8 deletions Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,19 @@ public class Main : ISettingProvider, IPlugin, IReloadable, IPluginI18n, ISavabl

private List<Bookmark> cachedBookmarks = new List<Bookmark>();

private readonly Settings _settings;
private readonly PluginJsonStorage<Settings> _storage;
private Settings _settings { get; set;}
private PluginJsonStorage<Settings> _storage { get; set;}

public Main()
public void Init(PluginInitContext context)
{
this.context = context;

_storage = new PluginJsonStorage<Settings>();
_settings = _storage.Load();

cachedBookmarks = Bookmarks.LoadAllBookmarks();
}

public void Init(PluginInitContext context)
{
this.context = context;
}

public List<Result> Query(Query query)
{
string param = query.Search.TrimStart();
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Flow.Launcher.Plugin.BrowserBookmark/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
18 changes: 10 additions & 8 deletions Plugins/Flow.Launcher.Plugin.Calculator/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,15 @@ 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;
private static SettingsViewModel _viewModel;

static Main()
{
MagesEngine = new Engine(new Configuration
{
Scope = new Dictionary<string, object>
{
{ "e", Math.E }, // e is not contained in the default mages engine
}
});

}

public void Init(PluginInitContext context)
Expand All @@ -47,6 +41,14 @@ public void Init(PluginInitContext context)

_viewModel = new SettingsViewModel();
_settings = _viewModel.Settings;

MagesEngine = new Engine(new Configuration
{
Scope = new Dictionary<string, object>
{
{ "e", Math.E }, // e is not contained in the default mages engine
}
});
}

public List<Result> Query(Query query)
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Flow.Launcher.Plugin.Calculator/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down