Fix hotkey initialization issue

This commit is contained in:
Jack251970 2025-03-18 12:05:58 +08:00
parent 9d1e305ed8
commit 044dc2c5ea

View file

@ -214,13 +214,14 @@ namespace Flow.Launcher
HotkeyList.ItemsSource = KeysToDisplay;
RefreshHotkeyInterface(Hotkey);
// We should not call RefreshHotkeyInterface here because DependencyProperty is not set yet
// And it will be called in OnHotkeyChanged event or Hotkey setter later
}
private void RefreshHotkeyInterface(string hotkey)
{
SetKeysToDisplay(new HotkeyModel(Hotkey));
CurrentHotkey = new HotkeyModel(Hotkey);
SetKeysToDisplay(new HotkeyModel(hotkey));
CurrentHotkey = new HotkeyModel(hotkey);
}
private static bool CheckHotkeyAvailability(HotkeyModel hotkey, bool validateKeyGesture) =>