aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/modrinth
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-05-26 16:23:43 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-05-26 16:23:43 -0700
commitcf4df19986fe53357ef04b2a4407f69a2f4fa196 (patch)
tree2750dc9c35dd98fee709db4ab2b2d87280b54994 /launcher/ui/pages/modplatform/modrinth
parentc15603406907383c58786cb1dc235ac79c7f9626 (diff)
downloadPrismLauncher-cf4df19986fe53357ef04b2a4407f69a2f4fa196.tar.gz
PrismLauncher-cf4df19986fe53357ef04b2a4407f69a2f4fa196.tar.bz2
PrismLauncher-cf4df19986fe53357ef04b2a4407f69a2f4fa196.zip
feat: display release type
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/ui/pages/modplatform/modrinth')
-rw-r--r--launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp
index 0bb11d83..725af9b0 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp
@@ -201,12 +201,12 @@ void ModrinthPage::onSelectionChanged(QModelIndex curr, QModelIndex prev)
qDebug() << *response;
qWarning() << "Error while reading modrinth modpack version: " << e.cause();
}
-
for (auto version : current.versions) {
+ auto release_type = version.version_type.isValid() ? QString(" : %1").arg(version.version_type.toString()) : "";
if (!version.name.contains(version.version))
- ui->versionSelectionBox->addItem(QString("%1 — %2").arg(version.name, version.version), QVariant(version.id));
+ ui->versionSelectionBox->addItem(QString("%1 — %2%3").arg(version.name, version.version, release_type), QVariant(version.id));
else
- ui->versionSelectionBox->addItem(version.name, QVariant(version.id));
+ ui->versionSelectionBox->addItem(QString("%1%2").arg(version.name, release_type), QVariant(version.id));
}
QVariant current_updated;