mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add hotkey id check
This commit is contained in:
parent
7fddfd961b
commit
e087d33fbb
2 changed files with 10 additions and 0 deletions
|
|
@ -257,6 +257,12 @@ namespace Flow.Launcher.Plugin
|
|||
/// </summary>
|
||||
public bool ShowBadge { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// List of hotkey IDs that are supported for this result.
|
||||
/// Those hotkeys should be registed by IPluginHotkey interface.
|
||||
/// </summary>
|
||||
public IList<int> HotkeyIds { get; set; } = new List<int>();
|
||||
|
||||
/// <summary>
|
||||
/// Run this result, asynchronously
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -269,6 +269,10 @@ internal static class HotKeyMapper
|
|||
if (metadata.Disabled)
|
||||
continue;
|
||||
|
||||
// Check hotkey supported state
|
||||
if (!selectedResult.HotkeyIds.Contains(pluginHotkey.Id))
|
||||
continue;
|
||||
|
||||
// Check action nullability
|
||||
if (pluginHotkey.Action == null)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue