mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
filter desctiption existance before passing it to distinct
This commit is contained in:
parent
55b0a91cdc
commit
033ce3051b
1 changed files with 4 additions and 3 deletions
|
|
@ -475,9 +475,10 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
return programs.GroupBy(p => p.FullPath.ToLower())
|
||||
.SelectMany(g =>
|
||||
{
|
||||
if (g.Count() > 1)
|
||||
return DistinctBy(g.Where(p => !string.IsNullOrEmpty(p.Description)), x => x.Description);
|
||||
return g;
|
||||
var temp = g.Where(g => !string.IsNullOrEmpty(g.Description)).ToList();
|
||||
if (temp.Any())
|
||||
return DistinctBy(temp, x => x.Description);
|
||||
return g.Take(1);
|
||||
}).ToArray();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue