fix: use better naming for Modrinth pack versions

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow 2022-06-24 09:11:11 -03:00
parent 0ec4ade683
commit 64d123f524
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469

View File

@ -199,7 +199,10 @@ void ModrinthPage::onSelectionChanged(QModelIndex curr, QModelIndex prev)
}
for (auto version : current.versions) {
ui->versionSelectionBox->addItem(version.version, QVariant(version.id));
if (!version.name.contains(version.version))
ui->versionSelectionBox->addItem(QString("%1 — %2").arg(version.name, version.version), QVariant(version.id));
else
ui->versionSelectionBox->addItem(version.name, QVariant(version.id));
}
QVariant current_updated;
@ -218,7 +221,10 @@ void ModrinthPage::onSelectionChanged(QModelIndex curr, QModelIndex prev)
} else {
for (auto version : current.versions) {
if (!version.name.contains(version.version))
ui->versionSelectionBox->addItem(QString("%1 - %2").arg(version.name, version.version), QVariant(version.id));
else
ui->versionSelectionBox->addItem(version.name, QVariant(version.id));
}
suggestCurrent();