Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Flow.Launcher/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,6 @@ await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () =>
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();

Expand Down
6 changes: 6 additions & 0 deletions Flow.Launcher/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.Core.Plugin;
using Flow.Launcher.Core.Resource;
using Flow.Launcher.Helper;
using Flow.Launcher.Infrastructure;
using Flow.Launcher.Infrastructure.Hotkey;
using Flow.Launcher.Infrastructure.Image;
using Flow.Launcher.Infrastructure.UserSettings;
using Flow.Launcher.Plugin.SharedCommands;
using Flow.Launcher.ViewModel;
Expand Down Expand Up @@ -173,6 +175,9 @@ private async void OnLoaded(object sender, RoutedEventArgs _)
// 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 is loaded
HotKeyMapper.Initialize();

// View model property changed event
_viewModel.PropertyChanged += (o, e) =>
{
Expand Down Expand Up @@ -289,6 +294,7 @@ private async void OnClosing(object sender, CancelEventArgs e)
_notifyIcon.Visible = false;
App.API.SaveAppAllSettings();
e.Cancel = true;
await ImageLoader.WaitSaveAsync();
await PluginManager.DisposePluginsAsync();
Notification.Uninstall();
// After plugins are all disposed, we can close the main window
Expand Down
Loading