Deprecate ActionKeywordRegistered, update API docs

Mark ActionKeywordRegistered as obsolete and always return false, reflecting support for multiple plugins per action keyword. Update IPublicAPI docs to clarify ActionKeywordAssigned is for legacy compatibility.
This commit is contained in:
Jack251970 2026-02-26 16:33:39 +08:00
parent 10fcbb9990
commit 39b2869cae
2 changed files with 8 additions and 4 deletions

View file

@ -721,12 +721,12 @@ namespace Flow.Launcher.Core.Plugin
#region Plugin Action Keyword
[Obsolete("This method is only used for old Flow compatibility.")]
public static bool ActionKeywordRegistered(string actionKeyword)
{
// this method is only checking for action keywords (defined as not '*') registration
// hence the actionKeyword != Query.GlobalPluginWildcardSign logic
return actionKeyword != Query.GlobalPluginWildcardSign
&& _nonGlobalPlugins.ContainsKey(actionKeyword);
// Since now we support to assign one action keyword to multiple plugins,
// this check is unnecessary, so we will just return false here to ensure compatibility for old plugins.
return false;
}
/// <summary>

View file

@ -293,6 +293,10 @@ namespace Flow.Launcher.Plugin
/// </summary>
/// <param name="actionKeyword">The actionkeyword for checking</param>
/// <returns>True if the actionkeyword is already assigned, False otherwise</returns>
/// <remarks>
/// Flow now supports to one action keyword to multiple plugins,
/// so this method is only used for old Flow compatibility.
/// </remarks>
bool ActionKeywordAssigned(string actionKeyword);
/// <summary>