mirror of
https://github.com/PrismLauncher/PrismLauncher
synced 2026-04-23 09:05:03 +00:00
Revert "Sort modpack entries by version, rather than publishing date" (#5243)
This commit is contained in:
commit
c7fd66cf97
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue