mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Refactor
This commit is contained in:
parent
d661836cad
commit
3347e9f39e
1 changed files with 2 additions and 8 deletions
|
|
@ -385,7 +385,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
.SelectMany(s => ProgramPaths(s.Location, suffixes));
|
||||
|
||||
// Remove disabled programs in DisabledProgramSources
|
||||
var programs = ExceptDisabledSource(paths)
|
||||
var programs = ExceptDisabledSource(paths).Select(x => GetProgramFromPath(x, protocols));
|
||||
|
||||
.Select(x => GetProgramFromPath(x, protocols));
|
||||
return programs;
|
||||
|
|
@ -418,13 +418,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
var toFilter = paths.AsParallel().SelectMany(p => ProgramPaths(p, suffixes, recursive: false));
|
||||
|
||||
var programs = ExceptDisabledSource(toFilter.Distinct())
|
||||
.Select(x => Extension(x) switch
|
||||
{
|
||||
ShortcutExtension => LnkProgram(x),
|
||||
UrlExtension => UrlProgram(x, protocols),
|
||||
ExeExtension => ExeProgram(x),
|
||||
_ => Win32Program(x)
|
||||
});
|
||||
.Select(x => GetProgramFromPath(x, protocols));
|
||||
return programs;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue