Skip to content

Commit 15208e5

Browse files
Jack251970TBM13
authored andcommitted
Check if plugin is modified before querying
1 parent debc1e1 commit 15208e5

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,14 @@ public static ICollection<PluginPair> ValidPluginsForQuery(Query query)
279279
return Array.Empty<PluginPair>();
280280

281281
if (!NonGlobalPlugins.TryGetValue(query.ActionKeyword, out var plugin))
282-
return GlobalPlugins;
282+
{
283+
return GlobalPlugins.Where(p => !PluginModified(p.Metadata.ID)).ToList();
284+
}
285+
286+
if (API.PluginModified(plugin.Metadata.ID))
287+
{
288+
return Array.Empty<PluginPair>();
289+
}
283290

284291
return new List<PluginPair>
285292
{
@@ -289,7 +296,7 @@ public static ICollection<PluginPair> ValidPluginsForQuery(Query query)
289296

290297
public static ICollection<PluginPair> ValidPluginsForHomeQuery()
291298
{
292-
return _homePlugins.ToList();
299+
return _homePlugins.Where(p => !PluginModified(p.Metadata.ID)).ToList();
293300
}
294301

295302
public static async Task<List<Result>> QueryForPluginAsync(PluginPair pair, Query query, CancellationToken token)

0 commit comments

Comments
 (0)