Skip to content

Commit

Permalink
Mojang Bedrock versions are now sorted newest to oldest
Browse files Browse the repository at this point in the history
  • Loading branch information
tekgator committed Jun 3, 2023
1 parent 5053b45 commit 4e50eb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Fixed
- Mojang Bedrock versions are now sorted newest to oldest


## [1.4.4] - 2023-06-03

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ where string.IsNullOrWhiteSpace(options.Version) || version.Equals(options.Versi
where options.IncludeSnapshotBuilds || !isPreview
let url = match.Value
let platform = match.Groups["platform"].Value.Equals("linux", StringComparison.OrdinalIgnoreCase) ? Os.Linux : Os.Windows
orderby version descending
select new MojangVersion(
Project: project,
Version: version,
Expand All @@ -98,7 +99,7 @@ where string.IsNullOrWhiteSpace(options.Version) || version.Equals(options.Versi
{
DetailUrl = url
}).ToList();

return options.MaxRecords.HasValue
? versions.Take(options.MaxRecords.Value).ToList()
: versions;
Expand Down

0 comments on commit 4e50eb7

Please sign in to comment.