Initialize hotkey mapper after window is loaded

This commit is contained in:
Jack251970 2025-04-05 12:52:26 +08:00
parent 4eba415d1f
commit afba3c01cc
2 changed files with 3 additions and 2 deletions

View file

@ -179,8 +179,6 @@ namespace Flow.Launcher
Current.MainWindow = _mainWindow;
Current.MainWindow.Title = Constant.FlowLauncher;
HotKeyMapper.Initialize();
// main windows needs initialized before theme change because of blur settings
Ioc.Default.GetRequiredService<Theme>().ChangeTheme();

View file

@ -173,6 +173,9 @@ namespace Flow.Launcher
// Without this part, when shown for the first time, switching the context menu does not move the cursor to the end.
_viewModel.QueryTextCursorMovedToEnd = false;
// Initialize hotkey mapper after window shown or hiden the first it is loaded
HotKeyMapper.Initialize();
// View model property changed event
_viewModel.PropertyChanged += (o, e) =>
{