This commit is contained in:
Vic 2022-10-25 01:13:36 +08:00
parent 440337ba22
commit 1aa3668ea4
2 changed files with 5 additions and 6 deletions

View file

@ -174,8 +174,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
var updatedListWithoutDisabledApps = applications
.Where(t1 => !Main._settings.DisabledProgramSources
.Any(x => x.UniqueIdentifier == t1.UniqueIdentifier))
.Select(x => x);
.Any(x => x.UniqueIdentifier == t1.UniqueIdentifier));
return updatedListWithoutDisabledApps.ToArray();
}

View file

@ -338,8 +338,8 @@ namespace Flow.Launcher.Plugin.Program.Programs
private static IEnumerable<Win32> UnregisteredPrograms(List<ProgramSource> sources, string[] suffixes)
{
var paths = ExceptDisabledSource(sources.Where(s => Directory.Exists(s.Location) && s.Enabled)
.SelectMany(s => ProgramPaths(s.Location, suffixes)), x => x)
.Distinct();
.SelectMany(s => ProgramPaths(s.Location, suffixes)))
.Distinct();
var programs = paths.Select(x => Extension(x) switch
{
@ -452,9 +452,9 @@ namespace Flow.Launcher.Plugin.Program.Programs
return entry;
}
public static IEnumerable<string> ExceptDisabledSource(IEnumerable<string> sources)
public static IEnumerable<string> ExceptDisabledSource(IEnumerable<string> paths)
{
return ExceptDisabledSource(sources, x => x);
return ExceptDisabledSource(paths, x => x.ToLowerInvariant());
}
public static IEnumerable<TSource> ExceptDisabledSource<TSource>(IEnumerable<TSource> sources,