mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Skip other commands if executed
This commit is contained in:
parent
b52c7e756c
commit
590ea6184f
1 changed files with 11 additions and 7 deletions
|
|
@ -251,11 +251,6 @@ internal static class HotKeyMapper
|
|||
{
|
||||
return new RelayCommand(() =>
|
||||
{
|
||||
if (_windowHotkeyEvents.TryGetValue(hotkey, out var existingCommand))
|
||||
{
|
||||
existingCommand.Execute(null);
|
||||
}
|
||||
|
||||
var selectedResult = _mainViewModel.Results.SelectedItem?.Result;
|
||||
// Check result nullability
|
||||
if (selectedResult != null)
|
||||
|
|
@ -274,11 +269,20 @@ internal static class HotKeyMapper
|
|||
if (metadata.Disabled)
|
||||
continue;
|
||||
|
||||
// Invoke action
|
||||
if (pluginHotkey.Action?.Invoke(selectedResult) ?? false)
|
||||
// Check action nullability
|
||||
if (pluginHotkey.Action == null)
|
||||
continue;
|
||||
|
||||
// Invoke action & return to skip other commands
|
||||
if (pluginHotkey.Action.Invoke(selectedResult))
|
||||
App.API.HideMainWindow();
|
||||
}
|
||||
}
|
||||
|
||||
if (_windowHotkeyEvents.TryGetValue(hotkey, out var existingCommand))
|
||||
{
|
||||
existingCommand.Execute(null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue