From 9e3893fd6219d2d2c8e21951cfd813fb02054a8b Mon Sep 17 00:00:00 2001 From: TheCourierNV Date: Thu, 12 Mar 2026 22:19:33 +0100 Subject: [PATCH] Sort modpack entries by version, rather than publishing date This fixes issues the display order while using packs like Fabolously Optimized, who release versions out of order Signed-off-by: TheCourierNV --- launcher/modplatform/ResourceAPI.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/launcher/modplatform/ResourceAPI.cpp b/launcher/modplatform/ResourceAPI.cpp index 067248567..978981ead 100644 --- a/launcher/modplatform/ResourceAPI.cpp +++ b/launcher/modplatform/ResourceAPI.cpp @@ -2,6 +2,7 @@ #include "Application.h" #include "Json.h" +#include "Version.h" #include "net/NetJob.h" #include "modplatform/ModIndex.h" @@ -114,8 +115,7 @@ Task::Ptr ResourceAPI::getProjectVersions(VersionSearchArgs&& args, Callback bool { - // dates are in RFC 3339 format - return a.date > b.date; + return Version(a.version) > Version(b.version); }; std::sort(unsortedVersions.begin(), unsortedVersions.end(), orderSortPredicate); } catch (const JSONValidationError& e) {