Skip to content

Commit

Permalink
Merge #4007 Sort mods satisfying the same recommendation by download …
Browse files Browse the repository at this point in the history
…count
  • Loading branch information
HebaruSan committed Jan 24, 2024
2 parents 5d4a210 + 9bd84ab commit 0bd6f6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
### Features

- [Updater] Support dev builds for auto updater (#3997 by: HebaruSan)
- [GUI] Sort mods satisfying the same recommendation by download count (#4007 by: HebaruSan)

### Bugfixes

Expand Down
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 0bd6f6c

Please sign in to comment.