From ffd877290dda77ab028b4024430df28b5944479c Mon Sep 17 00:00:00 2001 From: Oren Nachman Date: Mon, 8 Aug 2022 11:27:11 -0700 Subject: [PATCH] Addressing initial feedback --- Flow.Launcher.Core/Plugin/PluginsLoader.cs | 1 - Flow.Launcher/HotkeyControl.xaml.cs | 4 ++-- Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs | 2 +- Plugins/Flow.Launcher.Plugin.Shell/Main.cs | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/PluginsLoader.cs b/Flow.Launcher.Core/Plugin/PluginsLoader.cs index 646ead77a..265c19e6e 100644 --- a/Flow.Launcher.Core/Plugin/PluginsLoader.cs +++ b/Flow.Launcher.Core/Plugin/PluginsLoader.cs @@ -11,7 +11,6 @@ using Flow.Launcher.Infrastructure.Logger; using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Plugin; using Flow.Launcher.Plugin.SharedCommands; -using System.Diagnostics; using Stopwatch = Flow.Launcher.Infrastructure.Stopwatch; namespace Flow.Launcher.Core.Plugin diff --git a/Flow.Launcher/HotkeyControl.xaml.cs b/Flow.Launcher/HotkeyControl.xaml.cs index c69d73c02..6bd21453f 100644 --- a/Flow.Launcher/HotkeyControl.xaml.cs +++ b/Flow.Launcher/HotkeyControl.xaml.cs @@ -101,7 +101,7 @@ namespace Flow.Launcher } } - public void SetHotkey(string keyStr, bool triggerValidate = true) + public async Task SetHotkey(string keyStr, bool triggerValidate = true) { _ = SetHotkey(new HotkeyModel(keyStr), triggerValidate); } @@ -116,4 +116,4 @@ namespace Flow.Launcher tbMsg.Foreground = tbMsgForegroundColorOriginal; } } -} \ No newline at end of file +} diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs index 0251c9d68..2b56cdf6e 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Search/SearchManager.cs @@ -94,7 +94,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search keyword == Settings.IndexSearchActionKeyword, Settings.ActionKeyword.QuickAccessActionKeyword => Settings.QuickAccessKeywordEnabled && keyword == Settings.QuickAccessActionKeyword, - _ => false + _ => throw new NotImplementedException() }; } diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs index a8b7ea827..9f822ea47 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs @@ -376,9 +376,9 @@ namespace Flow.Launcher.Plugin.Shell new Result { Title = context.API.GetTranslation("flowlauncher_plugin_cmd_run_as_different_user"), - Action = c => + AsyncAction = async c => { - _ = Task.Run(() => Execute(ShellCommand.RunAsDifferentUser, PrepareProcessStartInfo(selectedResult.Title))); + Execute(ShellCommand.RunAsDifferentUser, PrepareProcessStartInfo(selectedResult.Title)); return true; }, IcoPath = "Images/user.png"