From e065743957b5e568b30ce6ce475206d273650789 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Wed, 2 Nov 2022 17:45:38 +0800 Subject: [PATCH 1/3] remove await to speedup startup --- Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs b/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs index dddb7cf68..bf62caee8 100644 --- a/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.PluginsManager/Main.cs @@ -37,7 +37,7 @@ namespace Flow.Launcher.Plugin.PluginsManager contextMenu = new ContextMenu(Context); pluginManager = new PluginsManager(Context, Settings); - await pluginManager.UpdateManifestAsync(); + _ = pluginManager.UpdateManifestAsync(); } public List LoadContextMenus(Result selectedResult) @@ -74,4 +74,4 @@ namespace Flow.Launcher.Plugin.PluginsManager return Context.API.GetTranslation("plugin_pluginsmanager_plugin_description"); } } -} \ No newline at end of file +} From 165aa90da1f815c12b0e4563a8a4ca02b717710c Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Thu, 3 Nov 2022 16:10:11 +0800 Subject: [PATCH 2/3] Fix indexing unwanted protocols in custom sources --- Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs index cc16a1ac7..e11638442 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs @@ -388,8 +388,7 @@ namespace Flow.Launcher.Plugin.Program.Programs ShortcutExtension => LnkProgram(x), UrlExtension => UrlProgram(x), _ => Win32Program(x) - }); - + }).Where(x => x.Valid); return programs; } @@ -440,7 +439,7 @@ namespace Flow.Launcher.Plugin.Program.Programs var filtered = ExceptDisabledSource(toFilter); - return filtered.Select(GetProgramFromPath).ToList(); // ToList due to disposing issue + return filtered.Select(GetProgramFromPath).Where(x => x.Valid).ToList(); // ToList due to disposing issue } private static IEnumerable GetPathFromRegistry(RegistryKey root) From b8a68febcd0c2fd0c47a82d1b1f9c05ddc509394 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Fri, 4 Nov 2022 01:50:28 +0800 Subject: [PATCH 3/3] Check after merging all win32 programs --- Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs index e11638442..fbb3ea32c 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs @@ -388,7 +388,7 @@ namespace Flow.Launcher.Plugin.Program.Programs ShortcutExtension => LnkProgram(x), UrlExtension => UrlProgram(x), _ => Win32Program(x) - }).Where(x => x.Valid); + }); return programs; } @@ -410,7 +410,7 @@ namespace Flow.Launcher.Plugin.Program.Programs ShortcutExtension => LnkProgram(x), UrlExtension => UrlProgram(x), _ => Win32Program(x) - }).Where(x => x.Valid); + }); return programs; } @@ -439,7 +439,7 @@ namespace Flow.Launcher.Plugin.Program.Programs var filtered = ExceptDisabledSource(toFilter); - return filtered.Select(GetProgramFromPath).Where(x => x.Valid).ToList(); // ToList due to disposing issue + return filtered.Select(GetProgramFromPath).ToList(); // ToList due to disposing issue } private static IEnumerable GetPathFromRegistry(RegistryKey root) @@ -568,7 +568,7 @@ namespace Flow.Launcher.Plugin.Program.Programs autoIndexPrograms = ProgramsHasher(autoIndexPrograms); - return programs.Concat(autoIndexPrograms).Distinct().ToArray(); + return programs.Concat(autoIndexPrograms).Where(x => x.Valid).Distinct().ToArray(); } #if DEBUG //This is to make developer aware of any unhandled exception and add in handling. catch (Exception)