aboutsummaryrefslogtreecommitdiff
path: root/application/pages
diff options
context:
space:
mode:
Diffstat (limited to 'application/pages')
-rw-r--r--application/pages/instance/VersionPage.cpp16
-rw-r--r--application/pages/modplatform/technic/TechnicModel.cpp4
2 files changed, 11 insertions, 9 deletions
diff --git a/application/pages/instance/VersionPage.cpp b/application/pages/instance/VersionPage.cpp
index eff12c9c..a98bfb7d 100644
--- a/application/pages/instance/VersionPage.cpp
+++ b/application/pages/instance/VersionPage.cpp
@@ -212,12 +212,16 @@ void VersionPage::updateVersionControls()
{
// FIXME: this is a dirty hack
auto minecraftVersion = Version(m_profile->getComponentVersion("net.minecraft"));
- bool newCraft = minecraftVersion >= Version("1.14");
- bool oldCraft = minecraftVersion <= Version("1.12.2");
- ui->actionInstall_Fabric->setEnabled(controlsEnabled && newCraft);
- ui->actionInstall_Forge->setEnabled(controlsEnabled);
- ui->actionInstall_LiteLoader->setEnabled(controlsEnabled && oldCraft);
- ui->actionReload->setEnabled(true);
+
+ bool supportsFabric = minecraftVersion >= Version("1.14");
+ ui->actionInstall_Fabric->setEnabled(controlsEnabled && supportsFabric);
+
+ bool supportsForge = minecraftVersion <= Version("1.16.5");
+ ui->actionInstall_Forge->setEnabled(controlsEnabled && supportsForge);
+
+ bool supportsLiteLoader = minecraftVersion <= Version("1.12.2");
+ ui->actionInstall_LiteLoader->setEnabled(controlsEnabled && supportsLiteLoader);
+
updateButtons();
}
diff --git a/application/pages/modplatform/technic/TechnicModel.cpp b/application/pages/modplatform/technic/TechnicModel.cpp
index a240a94a..def30783 100644
--- a/application/pages/modplatform/technic/TechnicModel.cpp
+++ b/application/pages/modplatform/technic/TechnicModel.cpp
@@ -95,9 +95,7 @@ void Technic::ListModel::performSearch()
NetJob *netJob = new NetJob("Technic::Search");
QString searchUrl = "";
if (currentSearchTerm.isEmpty()) {
- searchUrl = QString(
- "https://api.technicpack.net/trending?build=multimc"
- ).arg(currentSearchTerm);
+ searchUrl = "https://api.technicpack.net/trending?build=multimc";
}
else
{