From a4327122ec68db96eaae69a39ac82635db627a6b Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Fri, 5 Nov 2021 12:31:05 -0500 Subject: [PATCH] Revert change to close command and remove async in ToggleFlow --- Flow.Launcher/MainWindow.xaml.cs | 2 +- Flow.Launcher/ViewModel/MainViewModel.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 16c9fd05c..b0e3492d2 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -185,7 +185,7 @@ namespace Flow.Launcher var setting = items.Add(InternationalizationManager.Instance.GetTranslation("iconTraySettings")); setting.Click += (o, e) => App.API.OpenSettingDialog(); var exit = items.Add(InternationalizationManager.Instance.GetTranslation("iconTrayExit")); - exit.Click += (o, e) => Environment.Exit(0); + exit.Click += (o, e) => Close(); _notifyIcon.ContextMenuStrip = menu; _notifyIcon.MouseClick += (o, e) => diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index fde5bb467..99436a6ab 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -273,7 +273,7 @@ namespace Flow.Launcher.ViewModel ReloadPluginDataCommand = new RelayCommand(_ => { Hide(); - + PluginManager .ReloadData() .ContinueWith(_ => @@ -315,7 +315,7 @@ namespace Flow.Launcher.ViewModel /// public void ChangeQueryText(string queryText, bool reQuery = false) { - if (QueryText!=queryText) + if (QueryText != queryText) { // re-query is done in QueryText's setter method QueryText = queryText; @@ -696,7 +696,7 @@ namespace Flow.Launcher.ViewModel OpenResultCommandModifiers = _settings.OpenResultModifiers ?? DefaultOpenResultModifiers; } - public async void ToggleFlowLauncher() + public void ToggleFlowLauncher() { if (MainWindowVisibility != Visibility.Visible) {