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>
|
/// </summary>
|
||||||
public bool ShowBadge { get; set; } = false;
|
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>
|
/// <summary>
|
||||||
/// Run this result, asynchronously
|
/// Run this result, asynchronously
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -269,6 +269,10 @@ internal static class HotKeyMapper
|
||||||
if (metadata.Disabled)
|
if (metadata.Disabled)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// Check hotkey supported state
|
||||||
|
if (!selectedResult.HotkeyIds.Contains(pluginHotkey.Id))
|
||||||
|
continue;
|
||||||
|
|
||||||
// Check action nullability
|
// Check action nullability
|
||||||
if (pluginHotkey.Action == null)
|
if (pluginHotkey.Action == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue