mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Validate hotkey before setting
This commit is contained in:
parent
72f8b9e052
commit
c03a0b031e
1 changed files with 2 additions and 2 deletions
|
|
@ -70,7 +70,7 @@ namespace Flow.Launcher
|
||||||
|
|
||||||
if (triggerValidate)
|
if (triggerValidate)
|
||||||
{
|
{
|
||||||
bool hotkeyAvailable = keyModel.CharKey != Key.None && CheckHotkeyAvailability(keyModel);
|
bool hotkeyAvailable = CheckHotkeyAvailability(keyModel);
|
||||||
SetMessage(hotkeyAvailable);
|
SetMessage(hotkeyAvailable);
|
||||||
OnHotkeyChanged();
|
OnHotkeyChanged();
|
||||||
|
|
||||||
|
|
@ -88,7 +88,7 @@ namespace Flow.Launcher
|
||||||
return SetHotkeyAsync(new HotkeyModel(keyStr), triggerValidate);
|
return SetHotkeyAsync(new HotkeyModel(keyStr), triggerValidate);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool CheckHotkeyAvailability() => HotKeyMapper.CheckAvailability(CurrentHotkey);
|
private static bool CheckHotkeyAvailability(HotkeyModel hotkey) => hotkey.Validate() && HotKeyMapper.CheckAvailability(hotkey);
|
||||||
|
|
||||||
public new bool IsFocused => tbHotkey.IsFocused;
|
public new bool IsFocused => tbHotkey.IsFocused;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue