diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-10-04 07:43:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-04 07:43:21 +0200 |
commit | d186c34385df480988aab2a388c8889b9371c6c2 (patch) | |
tree | a0a00a53766621ba4f6b85947dc527aebb445ff3 /launcher | |
parent | 540fc7d2a82bc2eca57900b47e0b9cb75a07836e (diff) | |
parent | 77979b4c953aeff261a8d8bdd5b8a44297012de8 (diff) | |
download | PrismLauncher-d186c34385df480988aab2a388c8889b9371c6c2.tar.gz PrismLauncher-d186c34385df480988aab2a388c8889b9371c6c2.tar.bz2 PrismLauncher-d186c34385df480988aab2a388c8889b9371c6c2.zip |
Merge pull request #1676 from Trial97/release_order
revert back the release order
Diffstat (limited to 'launcher')
-rw-r--r-- | launcher/modplatform/flame/FlameAPI.cpp | 4 | ||||
-rw-r--r-- | launcher/modplatform/flame/FlameModIndex.cpp | 3 | ||||
-rw-r--r-- | launcher/modplatform/modrinth/ModrinthPackIndex.cpp | 3 |
3 files changed, 3 insertions, 7 deletions
diff --git a/launcher/modplatform/flame/FlameAPI.cpp b/launcher/modplatform/flame/FlameAPI.cpp index a9697893..e99ce3a5 100644 --- a/launcher/modplatform/flame/FlameAPI.cpp +++ b/launcher/modplatform/flame/FlameAPI.cpp @@ -133,9 +133,7 @@ auto FlameAPI::getLatestVersion(VersionSearchArgs&& args) -> ModPlatform::Indexe for (auto file : arr) { auto file_obj = Json::requireObject(file); auto file_tmp = FlameMod::loadIndexedPackVersion(file_obj); - if (file_tmp.date > ver.date && - (!args.loaders.has_value() || !file_tmp.loaders || args.loaders.value() & file_tmp.loaders) && - file_tmp.version_type <= ver.version_type) + if (file_tmp.date > ver.date && (!args.loaders.has_value() || !file_tmp.loaders || args.loaders.value() & file_tmp.loaders)) ver = file_tmp; } diff --git a/launcher/modplatform/flame/FlameModIndex.cpp b/launcher/modplatform/flame/FlameModIndex.cpp index 2adcd781..345883c1 100644 --- a/launcher/modplatform/flame/FlameModIndex.cpp +++ b/launcher/modplatform/flame/FlameModIndex.cpp @@ -96,9 +96,8 @@ void FlameMod::loadIndexedPackVersions(ModPlatform::IndexedPack& pack, } 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; diff --git a/launcher/modplatform/modrinth/ModrinthPackIndex.cpp b/launcher/modplatform/modrinth/ModrinthPackIndex.cpp index f1e77d46..5c8aed1a 100644 --- a/launcher/modplatform/modrinth/ModrinthPackIndex.cpp +++ b/launcher/modplatform/modrinth/ModrinthPackIndex.cpp @@ -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; |