From c39da2f5f388307e11611a21f24e388fbc4c470b Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Sat, 13 Apr 2024 13:06:04 -0500 Subject: [PATCH] fix: lost focus change current hotkey before stop recording store that --- Flow.Launcher/ViewModel/HotkeyControlViewModel.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/ViewModel/HotkeyControlViewModel.cs b/Flow.Launcher/ViewModel/HotkeyControlViewModel.cs index afc7d6a39..408235cd1 100644 --- a/Flow.Launcher/ViewModel/HotkeyControlViewModel.cs +++ b/Flow.Launcher/ViewModel/HotkeyControlViewModel.cs @@ -116,6 +116,8 @@ namespace Flow.Launcher.ViewModel SetKeysToDisplay(KeysToDisplay, CurrentHotkey); return; } + + Hotkey = CurrentHotkey.ToString(); await SetHotkeyAsync(CurrentHotkey, true); } @@ -146,20 +148,17 @@ namespace Flow.Launcher.ViewModel if (triggerValidate) { bool hotkeyAvailable = CheckHotkeyAvailability(keyModel, ValidateKeyGesture); - CurrentHotkeyAvailable = hotkeyAvailable; SetMessage(hotkeyAvailable ? "success" : "hotkeyUnavailable", !hotkeyAvailable); HotkeyDelegate?.Invoke(keyModel); if (CurrentHotkeyAvailable) { - CurrentHotkey = keyModel; Hotkey = keyModel.ToString(); SetKeysToDisplay(KeysToDisplay, CurrentHotkey); } } else { - CurrentHotkey = keyModel; Hotkey = keyModel.ToString(); } }