mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Compare commits
2 commits
baa3a690a3
...
f10f716619
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f10f716619 | ||
|
|
88ac19af76 |
1 changed files with 15 additions and 1 deletions
|
|
@ -380,7 +380,7 @@ namespace Flow.Launcher.Core.Plugin
|
|||
if (query is null)
|
||||
return Array.Empty<PluginPair>();
|
||||
|
||||
if (!GetNonGlobalPlugins().TryGetValue(query.ActionKeyword, out var plugins))
|
||||
if (!TryGetNonGlobalPlugins(query.ActionKeyword, out var plugins))
|
||||
{
|
||||
if (dialogJump)
|
||||
return [.. GetGlobalPlugins().Where(p => p.Plugin is IAsyncDialogJump && !PluginModified(p.Metadata.ID))];
|
||||
|
|
@ -395,6 +395,20 @@ namespace Flow.Launcher.Core.Plugin
|
|||
return [.. validPlugins];
|
||||
}
|
||||
|
||||
private static bool TryGetNonGlobalPlugins(string actionKeyword, out List<PluginPair> plugins)
|
||||
{
|
||||
if (_nonGlobalPlugins.TryGetValue(actionKeyword, out var list))
|
||||
{
|
||||
lock (list)
|
||||
{
|
||||
plugins = [.. list];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
plugins = [];
|
||||
return false;
|
||||
}
|
||||
|
||||
public static ICollection<PluginPair> ValidPluginsForHomeQuery()
|
||||
{
|
||||
return [.. _homePlugins.Where(p => !PluginModified(p.Metadata.ID))];
|
||||
|
|
|
|||
Loading…
Reference in a new issue