From 4101e345a2f792c5878364b656c9d4afa206e96a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 30 Nov 2025 06:09:39 +0000 Subject: [PATCH 01/13] Initial plan From 07294aab811e6feb2ff0592453d6d7f12851ca8b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 30 Nov 2025 06:14:48 +0000 Subject: [PATCH 02/13] Fix hide item option not working in Program plugin Co-authored-by: Jack251970 <53996452+Jack251970@users.noreply.github.com> --- Plugins/Flow.Launcher.Plugin.Program/Main.cs | 50 ++++++++++---------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs index 456085fcaf2..7a67eab8b16 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs @@ -442,12 +442,16 @@ public List LoadContextMenus(Result selectedResult) Title = Context.API.GetTranslation("flowlauncher_plugin_program_disable_program"), Action = c => { - _ = DisableProgramAsync(program); + _ = Task.Run(async () => + { + await DisableProgramAsync(program); + ResetCache(); + Context.API.ReQuery(); + }); Context.API.ShowMsg( Context.API.GetTranslation("flowlauncher_plugin_program_disable_dlgtitle_success"), Context.API.GetTranslation( "flowlauncher_plugin_program_disable_dlgtitle_success_message")); - Context.API.ReQuery(); return false; }, IcoPath = "Images/disable.png", @@ -464,46 +468,40 @@ private static async Task DisableProgramAsync(IProgram programToDelete) return; await _uwpsLock.WaitAsync(); - var reindexUwps = true; try { - reindexUwps = _uwps.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier); - var program = _uwps.First(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier); - program.Enabled = false; - _settings.DisabledProgramSources.Add(new ProgramSource(program)); + var program = _uwps.FirstOrDefault(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier); + if (program != null) + { + program.Enabled = false; + _settings.DisabledProgramSources.Add(new ProgramSource(program)); + // Reindex UWP programs + _ = Task.Run(IndexUwpProgramsAsync); + return; + } } finally { _uwpsLock.Release(); } - // Reindex UWP programs - if (reindexUwps) - { - _ = Task.Run(IndexUwpProgramsAsync); - return; - } - await _win32sLock.WaitAsync(); - var reindexWin32s = true; try { - reindexWin32s = _win32s.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier); - var program = _win32s.First(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier); - program.Enabled = false; - _settings.DisabledProgramSources.Add(new ProgramSource(program)); + var program = _win32s.FirstOrDefault(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier); + if (program != null) + { + program.Enabled = false; + _settings.DisabledProgramSources.Add(new ProgramSource(program)); + // Reindex Win32 programs + _ = Task.Run(IndexWin32ProgramsAsync); + return; + } } finally { _win32sLock.Release(); } - - // Reindex Win32 programs - if (reindexWin32s) - { - _ = Task.Run(IndexWin32ProgramsAsync); - return; - } } public static void StartProcess(Func runProcess, ProcessStartInfo info) From 14369d893fc85831acab52434a1c901cd1f06ada Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 30 Nov 2025 06:16:28 +0000 Subject: [PATCH 03/13] Address code review: add exception handling and move success message Co-authored-by: Jack251970 <53996452+Jack251970@users.noreply.github.com> --- Plugins/Flow.Launcher.Plugin.Program/Main.cs | 21 +++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs index 7a67eab8b16..707534ad41e 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs @@ -444,14 +444,21 @@ public List LoadContextMenus(Result selectedResult) { _ = Task.Run(async () => { - await DisableProgramAsync(program); - ResetCache(); - Context.API.ReQuery(); + try + { + await DisableProgramAsync(program); + ResetCache(); + Context.API.ShowMsg( + Context.API.GetTranslation("flowlauncher_plugin_program_disable_dlgtitle_success"), + Context.API.GetTranslation( + "flowlauncher_plugin_program_disable_dlgtitle_success_message")); + Context.API.ReQuery(); + } + catch (Exception e) + { + Context.API.LogException(ClassName, "Failed to disable program", e); + } }); - Context.API.ShowMsg( - Context.API.GetTranslation("flowlauncher_plugin_program_disable_dlgtitle_success"), - Context.API.GetTranslation( - "flowlauncher_plugin_program_disable_dlgtitle_success_message")); return false; }, IcoPath = "Images/disable.png", From ad254be1fd8909e42ab61482ba78c7f690875bed Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 30 Nov 2025 14:59:27 +0800 Subject: [PATCH 04/13] Add resetCache parameter and improve indexing logic Introduced an optional `resetCache` parameter to `IndexWin32ProgramsAsync` and `IndexUwpProgramsAsync` to allow finer control over cache resets during indexing. Updated `IndexProgramsAsync` to explicitly pass `true` for cache resets. Modified `DisableProgramAsync` to return a `bool` indicating success and adjusted its logic to prevent unnecessary cache resets when reindexing. Ensured it returns `false` if the program is already disabled. Replaced nullable `PackageCatalog?` with non-nullable `PackageCatalog` in `UWPPackage.cs` to ensure proper initialization. Updated `WatchPackageChangeAsync` and `WatchDirectory` to call indexing methods with `resetCache` set to `true` when changes are detected. Improved cache reset logic across methods by conditionally invoking `ResetCache` based on the `resetCache` parameter, enhancing performance and maintainability. --- Plugins/Flow.Launcher.Plugin.Program/Main.cs | 38 ++++++++++++------- .../Programs/UWPPackage.cs | 4 +- .../Programs/Win32.cs | 2 +- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs index 707534ad41e..f31d1521177 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs @@ -334,7 +334,7 @@ static void WatchProgramUpdate() } } - public static async Task IndexWin32ProgramsAsync() + public static async Task IndexWin32ProgramsAsync(bool resetCache = true) { await _win32sLock.WaitAsync(); try @@ -345,7 +345,10 @@ public static async Task IndexWin32ProgramsAsync() { _win32s.Add(win32); } - ResetCache(); + if (resetCache) + { + ResetCache(); + } await Context.API.SaveCacheBinaryStorageAsync>(Win32CacheName, Context.CurrentPluginMetadata.PluginCacheDirectoryPath); lock (_lastIndexTimeLock) { @@ -362,7 +365,7 @@ public static async Task IndexWin32ProgramsAsync() } } - public static async Task IndexUwpProgramsAsync() + public static async Task IndexUwpProgramsAsync(bool resetCache = true) { await _uwpsLock.WaitAsync(); try @@ -373,7 +376,10 @@ public static async Task IndexUwpProgramsAsync() { _uwps.Add(uwp); } - ResetCache(); + if (resetCache) + { + ResetCache(); + } await Context.API.SaveCacheBinaryStorageAsync>(UwpCacheName, Context.CurrentPluginMetadata.PluginCacheDirectoryPath); lock (_lastIndexTimeLock) { @@ -394,12 +400,12 @@ public static async Task IndexProgramsAsync() { var win32Task = Task.Run(async () => { - await Context.API.StopwatchLogInfoAsync(ClassName, "Win32Program index cost", IndexWin32ProgramsAsync); + await Context.API.StopwatchLogInfoAsync(ClassName, "Win32Program index cost", () => IndexWin32ProgramsAsync(true)); }); var uwpTask = Task.Run(async () => { - await Context.API.StopwatchLogInfoAsync(ClassName, "UWPProgram index cost", IndexUwpProgramsAsync); + await Context.API.StopwatchLogInfoAsync(ClassName, "UWPProgram index cost", () => IndexUwpProgramsAsync(true)); }); await Task.WhenAll(win32Task, uwpTask).ConfigureAwait(false); @@ -446,8 +452,10 @@ public List LoadContextMenus(Result selectedResult) { try { - await DisableProgramAsync(program); - ResetCache(); + if (await DisableProgramAsync(program)) + { + ResetCache(); + } Context.API.ShowMsg( Context.API.GetTranslation("flowlauncher_plugin_program_disable_dlgtitle_success"), Context.API.GetTranslation( @@ -469,10 +477,10 @@ public List LoadContextMenus(Result selectedResult) return menuOptions; } - private static async Task DisableProgramAsync(IProgram programToDelete) + private static async Task DisableProgramAsync(IProgram programToDelete) { if (_settings.DisabledProgramSources.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)) - return; + return false; await _uwpsLock.WaitAsync(); try @@ -483,8 +491,8 @@ private static async Task DisableProgramAsync(IProgram programToDelete) program.Enabled = false; _settings.DisabledProgramSources.Add(new ProgramSource(program)); // Reindex UWP programs - _ = Task.Run(IndexUwpProgramsAsync); - return; + _ = Task.Run(() => IndexUwpProgramsAsync(false)); + return true; } } finally @@ -501,14 +509,16 @@ private static async Task DisableProgramAsync(IProgram programToDelete) program.Enabled = false; _settings.DisabledProgramSources.Add(new ProgramSource(program)); // Reindex Win32 programs - _ = Task.Run(IndexWin32ProgramsAsync); - return; + _ = Task.Run(() => IndexWin32ProgramsAsync(false)); + return true; } } finally { _win32sLock.Release(); } + + return false; } public static void StartProcess(Func runProcess, ProcessStartInfo info) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs index 9a8326e9aa6..02253f3e1d0 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs @@ -290,7 +290,7 @@ private static IEnumerable CurrentUserPackages() } private static readonly Channel PackageChangeChannel = Channel.CreateBounded(1); - private static PackageCatalog? catalog; + private static PackageCatalog catalog; public static async Task WatchPackageChangeAsync() { @@ -317,7 +317,7 @@ public static async Task WatchPackageChangeAsync() { await Task.Delay(3000).ConfigureAwait(false); PackageChangeChannel.Reader.TryRead(out _); - await Task.Run(Main.IndexUwpProgramsAsync); + await Task.Run(() => Main.IndexUwpProgramsAsync(true)); } } } diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs index 7aca8f3b6a7..60a48011900 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs @@ -796,7 +796,7 @@ public static async Task MonitorDirectoryChangeAsync() { } - await Task.Run(Main.IndexWin32ProgramsAsync); + await Task.Run(() => Main.IndexWin32ProgramsAsync(true)); } } From 288ac479d4df035a1e9a6f17d0c414a31f6065ca Mon Sep 17 00:00:00 2001 From: Jack Ye Date: Sun, 30 Nov 2025 15:08:26 +0800 Subject: [PATCH 05/13] Success message shown even when no program was disabled Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- Plugins/Flow.Launcher.Plugin.Program/Main.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs index f31d1521177..70b3d68adf2 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs @@ -452,14 +452,15 @@ public List LoadContextMenus(Result selectedResult) { try { - if (await DisableProgramAsync(program)) + var disabled = await DisableProgramAsync(program); + if (disabled) { ResetCache(); + Context.API.ShowMsg( + Context.API.GetTranslation("flowlauncher_plugin_program_disable_dlgtitle_success"), + Context.API.GetTranslation( + "flowlauncher_plugin_program_disable_dlgtitle_success_message")); } - Context.API.ShowMsg( - Context.API.GetTranslation("flowlauncher_plugin_program_disable_dlgtitle_success"), - Context.API.GetTranslation( - "flowlauncher_plugin_program_disable_dlgtitle_success_message")); Context.API.ReQuery(); } catch (Exception e) From 2d44676b67076b9efc8abb9b62043944d20db863 Mon Sep 17 00:00:00 2001 From: Jack Ye Date: Sun, 30 Nov 2025 15:09:28 +0800 Subject: [PATCH 06/13] Remove the Task.Run wrapper Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs index 02253f3e1d0..dcdeaa5c319 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs @@ -317,7 +317,7 @@ public static async Task WatchPackageChangeAsync() { await Task.Delay(3000).ConfigureAwait(false); PackageChangeChannel.Reader.TryRead(out _); - await Task.Run(() => Main.IndexUwpProgramsAsync(true)); + await Main.IndexUwpProgramsAsync(true).ConfigureAwait(false); } } } From 8c4979d394d056054a8b575a3790bb2b215c767c Mon Sep 17 00:00:00 2001 From: Jack Ye Date: Sun, 30 Nov 2025 15:09:40 +0800 Subject: [PATCH 07/13] Remove the Task.Run wrapper Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs index 60a48011900..2c305806306 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs @@ -796,7 +796,7 @@ public static async Task MonitorDirectoryChangeAsync() { } - await Task.Run(() => Main.IndexWin32ProgramsAsync(true)); + await Main.IndexWin32ProgramsAsync(true).ConfigureAwait(false); } } From 3a59a53bac2868173913771c7f45acd12a0b7bf1 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 30 Nov 2025 15:11:12 +0800 Subject: [PATCH 08/13] Remove default `resetCache` parameter in async methods The default value `resetCache = true` was removed from the method signatures of `IndexWin32ProgramsAsync` and `IndexUwpProgramsAsync` in the `Flow.Launcher.Plugin.Program` namespace. These methods now require the `resetCache` parameter to be explicitly provided by the caller. This change improves clarity and reduces ambiguity in method invocation. --- Plugins/Flow.Launcher.Plugin.Program/Main.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs index 70b3d68adf2..782449ac6e6 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs @@ -334,7 +334,7 @@ static void WatchProgramUpdate() } } - public static async Task IndexWin32ProgramsAsync(bool resetCache = true) + public static async Task IndexWin32ProgramsAsync(bool resetCache) { await _win32sLock.WaitAsync(); try @@ -365,7 +365,7 @@ public static async Task IndexWin32ProgramsAsync(bool resetCache = true) } } - public static async Task IndexUwpProgramsAsync(bool resetCache = true) + public static async Task IndexUwpProgramsAsync(bool resetCache) { await _uwpsLock.WaitAsync(); try @@ -481,7 +481,9 @@ public List LoadContextMenus(Result selectedResult) private static async Task DisableProgramAsync(IProgram programToDelete) { if (_settings.DisabledProgramSources.Any(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)) + { return false; + } await _uwpsLock.WaitAsync(); try From 96a12a802fbcd8b11e5c46f25368d06fc8d70c27 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Thu, 4 Dec 2025 09:59:50 +0800 Subject: [PATCH 09/13] Improve clarity with named parameters in method calls Updated method calls to replace boolean arguments with named parameters for better readability and self-documentation. - In `UWPPackage.cs`, replaced `true` with `resetCache: true` in `Main.IndexUwpProgramsAsync`. - In `Win32.cs`, replaced `true` with `resetCache: true` in `Main.IndexWin32ProgramsAsync`. --- Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs | 2 +- Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs index dcdeaa5c319..8e336228541 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/UWPPackage.cs @@ -317,7 +317,7 @@ public static async Task WatchPackageChangeAsync() { await Task.Delay(3000).ConfigureAwait(false); PackageChangeChannel.Reader.TryRead(out _); - await Main.IndexUwpProgramsAsync(true).ConfigureAwait(false); + await Main.IndexUwpProgramsAsync(resetCache: true).ConfigureAwait(false); } } } diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs index 2c305806306..6c7ff1dc196 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs @@ -796,7 +796,7 @@ public static async Task MonitorDirectoryChangeAsync() { } - await Main.IndexWin32ProgramsAsync(true).ConfigureAwait(false); + await Main.IndexWin32ProgramsAsync(resetCache: true).ConfigureAwait(false); } } From 621dbc11a783b8839d663ee9ab996c808e132df1 Mon Sep 17 00:00:00 2001 From: Jack Ye Date: Thu, 4 Dec 2025 16:55:35 +0800 Subject: [PATCH 10/13] Update Plugins/Flow.Launcher.Plugin.Program/Main.cs Co-authored-by: Jeremy Wu --- Plugins/Flow.Launcher.Plugin.Program/Main.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs index 782449ac6e6..6de5abf4477 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs @@ -400,7 +400,7 @@ public static async Task IndexProgramsAsync() { var win32Task = Task.Run(async () => { - await Context.API.StopwatchLogInfoAsync(ClassName, "Win32Program index cost", () => IndexWin32ProgramsAsync(true)); + await Context.API.StopwatchLogInfoAsync(ClassName, "Win32Program index cost", () => IndexWin32ProgramsAsync(resetCache: true)); }); var uwpTask = Task.Run(async () => From 6a5de0b52bea38683fe8707dcb1abb8b58c9732f Mon Sep 17 00:00:00 2001 From: Jack Ye Date: Thu, 4 Dec 2025 16:55:45 +0800 Subject: [PATCH 11/13] Update Plugins/Flow.Launcher.Plugin.Program/Main.cs Co-authored-by: Jeremy Wu --- Plugins/Flow.Launcher.Plugin.Program/Main.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs index 6de5abf4477..40ed6d16973 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs @@ -405,7 +405,7 @@ public static async Task IndexProgramsAsync() var uwpTask = Task.Run(async () => { - await Context.API.StopwatchLogInfoAsync(ClassName, "UWPProgram index cost", () => IndexUwpProgramsAsync(true)); + await Context.API.StopwatchLogInfoAsync(ClassName, "UWPProgram index cost", () => IndexUwpProgramsAsync(resetCache: true)); }); await Task.WhenAll(win32Task, uwpTask).ConfigureAwait(false); From d4198192a03e61d3e2befdc56a1f62c153b898d3 Mon Sep 17 00:00:00 2001 From: Jack Ye Date: Thu, 4 Dec 2025 16:56:06 +0800 Subject: [PATCH 12/13] Add ResetCache Co-authored-by: Jeremy Wu --- Plugins/Flow.Launcher.Plugin.Program/Main.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs index 40ed6d16973..0f3b3503b1f 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs @@ -494,7 +494,7 @@ private static async Task DisableProgramAsync(IProgram programToDelete) program.Enabled = false; _settings.DisabledProgramSources.Add(new ProgramSource(program)); // Reindex UWP programs - _ = Task.Run(() => IndexUwpProgramsAsync(false)); + _ = Task.Run(() => IndexUwpProgramsAsync(resetCache: false)); return true; } } From 70519da2bebe9faa7f84b7f872e6430f5757561a Mon Sep 17 00:00:00 2001 From: Jack Ye Date: Thu, 4 Dec 2025 16:56:16 +0800 Subject: [PATCH 13/13] Add ResetCache Co-authored-by: Jeremy Wu --- Plugins/Flow.Launcher.Plugin.Program/Main.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Main.cs b/Plugins/Flow.Launcher.Plugin.Program/Main.cs index 0f3b3503b1f..e75ae2ed674 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Main.cs @@ -512,7 +512,7 @@ private static async Task DisableProgramAsync(IProgram programToDelete) program.Enabled = false; _settings.DisabledProgramSources.Add(new ProgramSource(program)); // Reindex Win32 programs - _ = Task.Run(() => IndexWin32ProgramsAsync(false)); + _ = Task.Run(() => IndexWin32ProgramsAsync(resetCache: false)); return true; } }