fix the flame loaders match

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2024-11-01 13:44:06 +02:00
parent ca0dd583ba
commit 0c962dff59
5 changed files with 47 additions and 25 deletions

View File

@ -8,6 +8,7 @@
#include "QObjectPtr.h"
#include "ResourceDownloadTask.h"
#include "modplatform/ModIndex.h"
#include "modplatform/helpers/HashUtils.h"
#include "tasks/ConcurrentTask.h"
@ -97,13 +98,9 @@ void ModrinthCheckUpdate::checkVersionsResponse(std::shared_ptr<QByteArray> resp
// Sometimes a version may have multiple files, one with "forge" and one with "fabric",
// so we may want to filter it
QString loader_filter;
static auto flags = { ModPlatform::ModLoaderType::NeoForge, ModPlatform::ModLoaderType::Forge,
ModPlatform::ModLoaderType::Quilt, ModPlatform::ModLoaderType::Fabric };
for (auto flag : flags) {
if (loader.testFlag(flag)) {
loader_filter = ModPlatform::getModLoaderAsString(flag);
break;
}
for (auto flag : ModPlatform::modLoaderTypesToList(loader)) {
loader_filter = ModPlatform::getModLoaderAsString(flag);
break;
}
// Currently, we rely on a couple heuristics to determine whether an update is actually available or not: