Skip to content

Commit

Permalink
Update Flow.Launcher/ViewModel/ResultsViewModel.cs
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and VictoriousRaptor committed Dec 25, 2024
1 parent 51a16cc commit 5f6ac6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Flow.Launcher/ViewModel/ResultsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ private List<ResultViewModel> NewResults(ICollection<ResultsForUpdate> resultsFo
if (!resultsForUpdates.Any())
return Results;

return Results.Where(r => r != null && resultsForUpdates.All(u => u.ID != r.Result.PluginID))
return Results.Where(r => r?.Result != null && resultsForUpdates.All(u => u.ID != r.Result.PluginID))
.Concat(resultsForUpdates.SelectMany(u => u.Results, (u, r) => new ResultViewModel(r, _settings)))
.OrderByDescending(rv => rv.Result.Score)
.ToList();
Expand Down

0 comments on commit 5f6ac6a

Please sign in to comment.