Better parent version filtering; handle old fabric :P

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2023-07-03 20:48:37 +01:00
parent 0e5c377680
commit 64c591b234
8 changed files with 40 additions and 20 deletions

View File

@ -434,22 +434,14 @@ void VersionPage::on_actionChange_version_triggered()
}
auto uid = list->uid();
// FIXME: this is still a horrible HACK.
if (uid == "net.minecraftforge" || uid == "com.mumfrey.liteloader" || uid == "net.fabricmc.fabric-loader" ||
uid == "org.quiltmc.quilt-loader") {
InstallLoaderDialog dialog(m_inst->getPackProfile(), uid, this);
dialog.exec();
m_container->refreshContainer();
return;
}
VersionSelectDialog vselect(list.get(), tr("Change %1 version").arg(name), this);
if (uid == "net.fabricmc.intermediary" || uid == "org.quiltmc.hashed")
{
vselect.setEmptyString(tr("No intermediary mappings versions are currently available."));
vselect.setEmptyErrorString(tr("Couldn't load or download the intermediary mappings version lists!"));
vselect.setExactFilter(BaseVersionList::ParentVersionRole, m_profile->getComponentVersion("net.minecraft"));
}
vselect.setExactIfPresentFilter(BaseVersionList::ParentVersionRole, m_profile->getComponentVersion("net.minecraft"));
auto currentVersion = patch->getVersion();
if(!currentVersion.isEmpty())
{