mirror of
https://github.com/PrismLauncher/PrismLauncher
synced 2026-04-23 09:05:03 +00:00
[Backport release-10.x] ModrinthCheckUpdate: Don't send a request that is doomed to fail (#4844)
This commit is contained in:
commit
43eeb14a7f
|
|
@ -90,13 +90,19 @@ void ModrinthCheckUpdate::getUpdateModsForLoader(std::optional<ModPlatform::ModL
|
|||
QStringList hashes;
|
||||
if (forceModLoaderCheck && loader.has_value()) {
|
||||
for (auto hash : m_mappings.keys()) {
|
||||
if (m_mappings[hash]->metadata()->loaders & loader.value()) {
|
||||
if (m_mappings.value(hash)->metadata()->loaders & loader.value()) {
|
||||
hashes.append(hash);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
hashes = m_mappings.keys();
|
||||
}
|
||||
|
||||
if (hashes.isEmpty()) {
|
||||
checkNextLoader();
|
||||
return;
|
||||
}
|
||||
|
||||
auto job = api.latestVersions(hashes, m_hashType, m_gameVersions, loader, response);
|
||||
|
||||
connect(job.get(), &Task::succeeded, this, [this, response, loader] { checkVersionsResponse(response, loader); });
|
||||
|
|
|
|||
Loading…
Reference in a new issue