revert back the release order

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2023-10-03 17:23:26 +03:00
parent eab1180f68
commit 77979b4c95
3 changed files with 3 additions and 7 deletions

View File

@ -109,9 +109,8 @@ void Modrinth::loadIndexedPackVersions(ModPlatform::IndexedPack& pack, QJsonArra
unsortedVersions.append(file);
}
auto orderSortPredicate = [](const ModPlatform::IndexedVersion& a, const ModPlatform::IndexedVersion& b) -> bool {
bool a_better_release = a.version_type <= b.version_type;
// dates are in RFC 3339 format
return a.date > b.date && a_better_release;
return a.date > b.date;
};
std::sort(unsortedVersions.begin(), unsortedVersions.end(), orderSortPredicate);
pack.versions = unsortedVersions;