Revert "Sort modpack entries by version, rather than publishing date"

This reverts commit 9e3893fd62.

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2026-03-23 19:54:18 +02:00
parent c16a25faef
commit 6674f1e803
No known key found for this signature in database
GPG key ID: 55EF5DA53DB36318

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) {