Revert "Sort modpack entries by version, rather than publishing date" (#5243)

This commit is contained in:
Alexandru Ionut Tripon 2026-03-26 18:05:19 +00:00 committed by GitHub
commit c7fd66cf97
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,7 +2,6 @@
#include "Application.h"
#include "Json.h"
#include "Version.h"
#include "net/NetJob.h"
#include "modplatform/ModIndex.h"
@ -117,7 +116,8 @@ Task::Ptr ResourceAPI::getProjectVersions(VersionSearchArgs&& args, Callback<QVe
}
auto orderSortPredicate = [](const ModPlatform::IndexedVersion& a, const ModPlatform::IndexedVersion& b) -> bool {
return Version(a.version) > Version(b.version);
// dates are in RFC 3339 format
return a.date > b.date;
};
std::sort(unsortedVersions.begin(), unsortedVersions.end(), orderSortPredicate);
} catch (const JSONValidationError& e) {