Skip to content

Commit

Permalink
Sort mods satisfying the same recommendation by download count
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Jan 23, 2024
1 parent 5d4a210 commit 9bd84ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Core/Registry/Registry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,10 @@ public List<CkanModule> LatestAvailableWithProvides(
.Select(am => am.Latest(gameVersion, relationship_descriptor,
installed, toInstall))
.Where(m => m?.ProvidesList?.Contains(identifier) ?? false)
// Put the most popular one on top
.OrderByDescending(m => repoDataMgr.GetDownloadCount(Repositories.Values,
m.identifier)
?? 0)
.ToList();
}
else
Expand Down

0 comments on commit 9bd84ab

Please sign in to comment.