From 099021b186874c66be267585278fdc5f385a9de0 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Mon, 24 Apr 2023 19:50:34 +0800 Subject: [PATCH 01/20] Save programs cache after indexing --- Plugins/Flow.Launcher.Plugin.Program/Main.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs index 340d882da..c847982a2 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs @@ -110,6 +110,8 @@ namespace Flow.Launcher.Plugin.Program var win32S = Win32.All(_settings); _win32s = win32S; ResetCache(); + _win32Storage.Save(_win32s); + _settings.LastIndexTime = DateTime.Now; } public static void IndexUwpPrograms() @@ -117,6 +119,8 @@ namespace Flow.Launcher.Plugin.Program var applications = UWP.All(_settings); _uwps = applications; ResetCache(); + _uwpStorage.Save(_uwps); + _settings.LastIndexTime = DateTime.Now; } public static async Task IndexProgramsAsync() @@ -131,7 +135,6 @@ namespace Flow.Launcher.Plugin.Program Stopwatch.Normal("|Flow.Launcher.Plugin.Program.Main|UWPProgram index cost", IndexUwpPrograms); }); await Task.WhenAll(a, b).ConfigureAwait(false); - _settings.LastIndexTime = DateTime.Today; } internal static void ResetCache() @@ -199,7 +202,6 @@ namespace Flow.Launcher.Plugin.Program _ = Task.Run(() => { IndexUwpPrograms(); - _settings.LastIndexTime = DateTime.Today; }); } else if (_win32s.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)) @@ -210,7 +212,6 @@ namespace Flow.Launcher.Plugin.Program _ = Task.Run(() => { IndexWin32Programs(); - _settings.LastIndexTime = DateTime.Today; }); } } From b123c09c6c3ba0b2b66f58c4f38acdd40a6048dc Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Mon, 24 Apr 2023 21:03:49 +0800 Subject: [PATCH 02/20] Remove unused settings --- Plugins/Flow.Launcher.Plugin.Program/Settings.cs | 7 ------- .../Views/ProgramSetting.xaml.cs | 12 ------------ 2 files changed, 19 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Settings.cs b/Plugins/Flow.Launcher.Plugin.Program/Settings.cs index f59facaa4..ca203f803 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Settings.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Settings.cs @@ -121,13 +121,6 @@ namespace Flow.Launcher.Plugin.Program public bool EnablePathSource { get; set; } = false; public bool EnableUWP { get; set; } = true; - public string CustomizedExplorer { get; set; } = Explorer; - public string CustomizedArgs { get; set; } = ExplorerArgs; - internal const char SuffixSeparator = ';'; - - internal const string Explorer = "explorer"; - - internal const string ExplorerArgs = "%s"; } } diff --git a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs index 4b63d38a5..156f33ebc 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Views/ProgramSetting.xaml.cs @@ -87,18 +87,6 @@ namespace Flow.Launcher.Plugin.Program.Views } } - public string CustomizedExplorerPath - { - get => _settings.CustomizedExplorer; - set => _settings.CustomizedExplorer = value; - } - - public string CustomizedExplorerArg - { - get => _settings.CustomizedArgs; - set => _settings.CustomizedArgs = value; - } - public bool ShowUWPCheckbox => UWP.SupportUWP(); public ProgramSetting(PluginInitContext context, Settings settings, Win32[] win32s, UWP.Application[] uwps) From 4debacde4fc633b45d614a922d14ba5850a7603a Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Mon, 24 Apr 2023 21:22:18 +0800 Subject: [PATCH 03/20] Refactor program indexing and cache logic No longer await on first run (no cache detected) to speed up boost 30 hours cache life --- Plugins/Flow.Launcher.Plugin.Program/Main.cs | 27 +++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs index c847982a2..ac23534b1 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs @@ -88,21 +88,24 @@ namespace Flow.Launcher.Plugin.Program bool cacheEmpty = !_win32s.Any() && !_uwps.Any(); - var a = Task.Run(() => + if (cacheEmpty || _settings.LastIndexTime.AddHours(30) < DateTime.Now) { - Stopwatch.Normal("|Flow.Launcher.Plugin.Program.Main|Win32Program index cost", IndexWin32Programs); - }); - - var b = Task.Run(() => + _ = Task.Run(async () => + { + await IndexProgramsAsync().ConfigureAwait(false); + WatchProgramUpdate(); + }); + } + else { - Stopwatch.Normal("|Flow.Launcher.Plugin.Program.Main|UWPPRogram index cost", IndexUwpPrograms); - }); + WatchProgramUpdate(); + } - if (cacheEmpty) - await Task.WhenAll(a, b); - - Win32.WatchProgramUpdate(_settings); - _ = UWP.WatchPackageChange(); + static void WatchProgramUpdate() + { + Win32.WatchProgramUpdate(_settings); + _ = UWP.WatchPackageChange(); + } } public static void IndexWin32Programs() From 955ff6999fcc04da370cbdb0144a82597d429d9d Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Fri, 5 May 2023 22:25:27 +1000 Subject: [PATCH 04/20] add sponsor --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 896d81e8a..7db57af18 100644 --- a/README.md +++ b/README.md @@ -341,6 +341,7 @@ And you can download       +

### Mentions From dd42b9d5dc8902513352fc7d5ebc58a31ce7236b Mon Sep 17 00:00:00 2001 From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com> Date: Wed, 10 May 2023 09:23:01 +0800 Subject: [PATCH 05/20] Remove deprecated Everything plugin from readme --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 7db57af18..fdd33f3f8 100644 --- a/README.md +++ b/README.md @@ -222,9 +222,6 @@ And you can download

-### Everything - - ### SpotifyPremium From bc181683a0b23c6d66f4d996d7ebf5d34d08b8ff Mon Sep 17 00:00:00 2001 From: rainyl Date: Thu, 11 May 2023 22:57:10 +0800 Subject: [PATCH 06/20] Add plugin API: HideMainWindow(), IsMainWindowVisible() --- Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs | 11 +++++++++++ Flow.Launcher/PublicAPIInstance.cs | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs index 19b69b015..d0fdf136b 100644 --- a/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs +++ b/Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs @@ -80,6 +80,17 @@ namespace Flow.Launcher.Plugin /// void ShowMainWindow(); + /// + /// Hide MainWindow + /// + void HideMainWindow(); + + /// + /// Representing whether the main window is visible + /// + /// + bool IsMainWindowVisible(); + /// /// Show message box /// diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index 636699ad0..800115bfa 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -73,6 +73,10 @@ namespace Flow.Launcher public void ShowMainWindow() => _mainVM.Show(); + public void HideMainWindow() => _mainVM.Hide(); + + public bool IsMainWindowVisible() => _mainVM.MainWindowVisibilityStatus; + public void CheckForNewUpdate() => _settingsVM.UpdateApp(); public void SaveAppAllSettings() From 19a820c273fe4a2ba46778f207262a08c5158e5a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 May 2023 22:59:30 +0000 Subject: [PATCH 07/20] Bump Microsoft.VisualStudio.Threading from 17.4.27 to 17.5.22 Bumps [Microsoft.VisualStudio.Threading](https://github.com/microsoft/vs-threading) from 17.4.27 to 17.5.22. - [Release notes](https://github.com/microsoft/vs-threading/releases) - [Commits](https://github.com/microsoft/vs-threading/commits) --- updated-dependencies: - dependency-name: Microsoft.VisualStudio.Threading dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .../Flow.Launcher.Infrastructure.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj index f4d7511c6..1d4db757b 100644 --- a/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj +++ b/Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj @@ -1,4 +1,4 @@ - + net7.0-windows @@ -53,7 +53,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + From eaaf7c2e4a07dee3426b4d7b7d90d0612a6aec64 Mon Sep 17 00:00:00 2001 From: Nguyen Tran Date: Wed, 17 May 2023 20:24:03 -0400 Subject: [PATCH 08/20] Plugin Store search works after refresh button clicked --- Flow.Launcher/SettingWindow.xaml.cs | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Flow.Launcher/SettingWindow.xaml.cs b/Flow.Launcher/SettingWindow.xaml.cs index b80208a0c..7ac9c8cb6 100644 --- a/Flow.Launcher/SettingWindow.xaml.cs +++ b/Flow.Launcher/SettingWindow.xaml.cs @@ -9,6 +9,7 @@ using Flow.Launcher.ViewModel; using ModernWpf; using ModernWpf.Controls; using System; +using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Security.Policy; @@ -58,12 +59,24 @@ namespace Flow.Launcher pluginListView = (CollectionView)CollectionViewSource.GetDefaultView(Plugins.ItemsSource); pluginListView.Filter = PluginListFilter; - pluginStoreView = (CollectionView)CollectionViewSource.GetDefaultView(StoreListBox.ItemsSource); + pluginStoreView = (CollectionView)CollectionViewSource.GetDefaultView(StoreListBox.ItemsSource); pluginStoreView.Filter = PluginStoreFilter; + viewModel.PropertyChanged += new PropertyChangedEventHandler(SettingsWindowViewModelChanged); + InitializePosition(); } + private void SettingsWindowViewModelChanged(object sender, PropertyChangedEventArgs e) + { + if (e.PropertyName == nameof(viewModel.ExternalPlugins)) + { + pluginStoreView = (CollectionView)CollectionViewSource.GetDefaultView(StoreListBox.ItemsSource); + pluginStoreView.Filter = PluginStoreFilter; + pluginStoreView.Refresh(); + } + } + private void OnSelectPythonPathClick(object sender, RoutedEventArgs e) { var selectedFile = viewModel.GetFileFromDialog( @@ -257,9 +270,9 @@ namespace Flow.Launcher { var confirmResult = MessageBox.Show( InternationalizationManager.Instance.GetTranslation("clearlogfolderMessage"), - InternationalizationManager.Instance.GetTranslation("clearlogfolder"), + InternationalizationManager.Instance.GetTranslation("clearlogfolder"), MessageBoxButton.YesNo); - + if (confirmResult == MessageBoxResult.Yes) { viewModel.ClearLogFolder(); @@ -390,7 +403,7 @@ namespace Flow.Launcher } #endregion - + private CollectionView pluginListView; private CollectionView pluginStoreView; From f019bb22845ed0635c637f7ec4cd13ebfa11b701 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Fri, 19 May 2023 00:55:41 -0400 Subject: [PATCH 09/20] Remove result logic so this method can be reused --- Flow.Launcher/ViewModel/MainViewModel.cs | 49 ++++++++++-------------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 27809f67b..5486b41fb 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -1114,37 +1114,30 @@ namespace Flow.Launcher.ViewModel { if (string.IsNullOrEmpty(stringToCopy)) { - var result = Results.SelectedItem?.Result; - if (result != null) - { - string copyText = result.CopyText; - var isFile = File.Exists(copyText); - var isFolder = Directory.Exists(copyText); - if (isFile || isFolder) - { - var paths = new StringCollection - { - copyText - }; - - Clipboard.SetFileDropList(paths); - App.API.ShowMsg( - $"{App.API.GetTranslation("copy")} {(isFile ? App.API.GetTranslation("fileTitle") : App.API.GetTranslation("folderTitle"))}", - App.API.GetTranslation("completedSuccessfully")); - } - else - { - Clipboard.SetDataObject(copyText); - App.API.ShowMsg( - $"{App.API.GetTranslation("copy")} {App.API.GetTranslation("textTitle")}", - App.API.GetTranslation("completedSuccessfully")); - } - } - return; } + var isFile = File.Exists(stringToCopy); + var isFolder = Directory.Exists(stringToCopy); + if (isFile || isFolder) + { + var paths = new StringCollection + { + stringToCopy + }; - Clipboard.SetDataObject(stringToCopy); + Clipboard.SetFileDropList(paths); + App.API.ShowMsg( + $"{App.API.GetTranslation("copy")} {(isFile ? App.API.GetTranslation("fileTitle") : App.API.GetTranslation("folderTitle"))}", + App.API.GetTranslation("completedSuccessfully")); + } + else + { + Clipboard.SetDataObject(stringToCopy); + App.API.ShowMsg( + $"{App.API.GetTranslation("copy")} {App.API.GetTranslation("textTitle")}", + App.API.GetTranslation("completedSuccessfully")); + } + return; } #endregion From f992729147b2a415a82526d9479e9fb875c8aa61 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Fri, 19 May 2023 00:56:33 -0400 Subject: [PATCH 10/20] Provide CopyText field instead of empty string --- Flow.Launcher/MainWindow.xaml.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 43bd9fd35..b334dd0fd 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -59,9 +59,11 @@ namespace Flow.Launcher private void OnCopy(object sender, ExecutedRoutedEventArgs e) { - if (QueryTextBox.SelectionLength == 0) + var result = _viewModel.Results.SelectedItem?.Result; + if (QueryTextBox.SelectionLength == 0 && result != null) { - _viewModel.ResultCopy(string.Empty); + string copyText = result.CopyText; + _viewModel.ResultCopy(copyText); } else if (!string.IsNullOrEmpty(QueryTextBox.Text)) From ed11cc2b22c0b6eaccfa74cef246e17b8289b9d1 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Fri, 19 May 2023 00:57:02 -0400 Subject: [PATCH 11/20] Use ResultCopy to support files --- Flow.Launcher/PublicAPIInstance.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index 800115bfa..b61e22d5e 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -118,7 +118,7 @@ namespace Flow.Launcher public void CopyToClipboard(string text) { - Clipboard.SetDataObject(text); + _mainVM.ResultCopy(text); } public void StartLoadingBar() => _mainVM.ProgressBarVisibility = Visibility.Visible; From 6cc5fe8ff64a810f700a2fac90a363d5eefee054 Mon Sep 17 00:00:00 2001 From: Nguyen Tran Date: Sun, 21 May 2023 23:39:13 -0400 Subject: [PATCH 12/20] Add admin permissions when non-admin doesn't work --- .../Helper/ResultHelper.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs index 0bfb00b34..308e4a88c 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs @@ -1,4 +1,5 @@ using System; +using System.ComponentModel; using System.Collections.Generic; using System.Diagnostics; using System.Linq; @@ -201,6 +202,21 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper Process.Start(processStartInfo); return true; } + catch (Win32Exception) + { + try + { + processStartInfo.UseShellExecute = true; + processStartInfo.Verb = "runas"; + Process.Start(processStartInfo); + return true; + } + catch (Exception exception) + { + Log.Exception("can't open settings on elevated permission", exception, typeof(ResultHelper)); + return false; + } + } catch (Exception exception) { Log.Exception("can't open settings", exception, typeof(ResultHelper)); From 31d80fe378f5644a155f8623b70f36012cb10927 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 May 2023 07:54:41 +0000 Subject: [PATCH 13/20] Bump Microsoft.IO.RecyclableMemoryStream from 2.3.1 to 2.3.2 (#2154) --- Flow.Launcher.Core/Flow.Launcher.Core.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Core/Flow.Launcher.Core.csproj b/Flow.Launcher.Core/Flow.Launcher.Core.csproj index 4077320bc..429dcd00f 100644 --- a/Flow.Launcher.Core/Flow.Launcher.Core.csproj +++ b/Flow.Launcher.Core/Flow.Launcher.Core.csproj @@ -1,4 +1,4 @@ - + net7.0-windows @@ -55,7 +55,7 @@ - + From 4ddf037a6f2656fda2b50def028aff6b08fe32d9 Mon Sep 17 00:00:00 2001 From: Ioannis G Date: Fri, 26 May 2023 16:35:10 +0300 Subject: [PATCH 14/20] remove NuGet.CommandLine package AppVeyor now has the nuget CLI pre-installed in the build image we use, so we no longer need to manually install and alias it in our build script. --- Flow.Launcher/Flow.Launcher.csproj | 4 ---- Scripts/post_build.ps1 | 1 - 2 files changed, 5 deletions(-) diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj index 02930fc25..384df2e62 100644 --- a/Flow.Launcher/Flow.Launcher.csproj +++ b/Flow.Launcher/Flow.Launcher.csproj @@ -94,10 +94,6 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index 23eabedfd..1757ed99e 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -71,7 +71,6 @@ function Pack-Squirrel-Installer ($path, $version, $output) { Write-Host "Packing: $spec" Write-Host "Input path: $input" - New-Alias Nuget $env:USERPROFILE\.nuget\packages\NuGet.CommandLine\6.3.1\tools\NuGet.exe -Force # dotnet pack is not used because ran into issues, need to test installation and starting up if to use it. nuget pack $spec -Version $version -BasePath $input -OutputDirectory $output -Properties Configuration=Release From bbaa388ff4b6a0cf0404a1276dfe1f4a17ac9cb2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Jun 2023 06:29:41 +0000 Subject: [PATCH 15/20] Bump FSharp.Core from 7.0.0 to 7.0.300 (#2163) --- Flow.Launcher.Core/Flow.Launcher.Core.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Core/Flow.Launcher.Core.csproj b/Flow.Launcher.Core/Flow.Launcher.Core.csproj index 429dcd00f..8d06e71c5 100644 --- a/Flow.Launcher.Core/Flow.Launcher.Core.csproj +++ b/Flow.Launcher.Core/Flow.Launcher.Core.csproj @@ -54,7 +54,7 @@ - + From 6bdf6ac1ce3d02e3e04dc31389866f12f2fe75ac Mon Sep 17 00:00:00 2001 From: Ioannis G Date: Sun, 4 Jun 2023 06:20:50 +0300 Subject: [PATCH 16/20] fix kill command to honor "Last Query Style" --- .../Flow.Launcher.Plugin.ProcessKiller/Main.cs | 15 +++++---------- .../ProcessHelper.cs | 3 ++- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs index 3eff7e398..be2a2dd66 100644 --- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using Flow.Launcher.Infrastructure; -using System.Threading.Tasks; namespace Flow.Launcher.Plugin.ProcessKiller { @@ -89,7 +88,8 @@ namespace Flow.Launcher.Plugin.ProcessKiller Action = (c) => { processHelper.TryKill(p); - _ = DelayAndReQueryAsync(query.RawQuery); // Re-query after killing process to refresh process list + // Re-query to refresh process list + _context.API.ChangeQuery(query.RawQuery, true); return true; } }); @@ -114,7 +114,8 @@ namespace Flow.Launcher.Plugin.ProcessKiller { processHelper.TryKill(p.Process); } - _ = DelayAndReQueryAsync(query.RawQuery); // Re-query after killing process to refresh process list + // Re-query to refresh process list + _context.API.ChangeQuery(query.RawQuery, true); return true; } }); @@ -122,11 +123,5 @@ namespace Flow.Launcher.Plugin.ProcessKiller return sortedResults; } - - private static async Task DelayAndReQueryAsync(string query) - { - await Task.Delay(500); - _context.API.ChangeQuery(query, true); - } } } diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs index 0932955d6..0acc39fbb 100644 --- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs +++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs @@ -1,4 +1,4 @@ -using Flow.Launcher.Infrastructure; +using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Logger; using System; using System.Collections.Generic; @@ -75,6 +75,7 @@ namespace Flow.Launcher.Plugin.ProcessKiller if (!p.HasExited) { p.Kill(); + p.WaitForExit(50); } } catch (Exception e) From 488c8e81b8541b48c973c4dc923148fb0d17e23e Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Sun, 4 Jun 2023 17:13:48 -0400 Subject: [PATCH 17/20] Update docstring --- Flow.Launcher/ViewModel/MainViewModel.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index 5486b41fb..8529df7b3 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -1104,12 +1104,11 @@ namespace Flow.Launcher.ViewModel } /// - /// This is the global copy method for an individual result. If no text is passed, - /// the method will work out what is to be copied based on the result, so plugin can offer the text - /// to be copied via the result model. If the text is a directory/file path, - /// then actual file/folder will be copied instead. - /// The result's subtitle text is the default text to be copied + /// Copies the specified file or folder path to the clipboard, or the specified text if it is not a valid file or folder path. + /// Shows a message indicating whether the operation was completed successfully. /// + /// The file or folder path, or text to copy to the clipboard. + /// Nothing. public void ResultCopy(string stringToCopy) { if (string.IsNullOrEmpty(stringToCopy)) From c6318952111bbadf32b20bbeb70ba236f7336d50 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Sun, 4 Jun 2023 17:22:49 -0400 Subject: [PATCH 18/20] Copy selected query text if there is a selection --- Flow.Launcher/MainWindow.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index b334dd0fd..1e7735fb2 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -68,7 +68,7 @@ namespace Flow.Launcher } else if (!string.IsNullOrEmpty(QueryTextBox.Text)) { - _viewModel.ResultCopy(QueryTextBox.SelectedText); + System.Windows.Clipboard.SetText(QueryTextBox.SelectedText); } } From 9a28266e1fac91b481d46398a7c2418299b4cf3f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Jun 2023 22:59:56 +0000 Subject: [PATCH 19/20] Bump Microsoft.NET.Test.Sdk from 17.4.1 to 17.6.1 Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.4.1 to 17.6.1. - [Release notes](https://github.com/microsoft/vstest/releases) - [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md) - [Commits](https://github.com/microsoft/vstest/compare/v17.4.1...v17.6.1) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Flow.Launcher.Test/Flow.Launcher.Test.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Test/Flow.Launcher.Test.csproj b/Flow.Launcher.Test/Flow.Launcher.Test.csproj index f5d9dea28..d88becad0 100644 --- a/Flow.Launcher.Test/Flow.Launcher.Test.csproj +++ b/Flow.Launcher.Test/Flow.Launcher.Test.csproj @@ -54,7 +54,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + \ No newline at end of file From a35b0011700217232509359bfe57bf529e3662b5 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 11 Jun 2023 16:45:27 +0930 Subject: [PATCH 20/20] Update AppVeyor NuGet API (#2180) --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index a3cc8ecfb..2068cd67b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -51,7 +51,7 @@ deploy: - provider: NuGet artifact: Plugin nupkg api_key: - secure: EwKxUgjI8VGouFq9fdhI68+uj42amAhwE65JixIbqx8VlqLbyEuW97CLjBBOIL0r + secure: Uho7u3gk4RHzyWGgqgXZuOeI55NbqHLQ9tXahL7xmE4av2oiSldrNiyGgy/0AQYw on: APPVEYOR_REPO_TAG: true