More intuitive version changing for modpacks
Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
parent
0136c2e82a
commit
58a28f319a
7 changed files with 30 additions and 22 deletions
|
@ -206,13 +206,8 @@ void FlamePage::onSelectionChanged(QModelIndex curr, [[maybe_unused]] QModelInde
|
|||
else
|
||||
++it;
|
||||
#endif
|
||||
for (auto version : current.versions) {
|
||||
auto release_type = version.version_type.isValid() ? QString(" [%1]").arg(version.version_type.toString()) : "";
|
||||
auto mcVersion = !version.mcVersion.isEmpty() && !version.version.contains(version.mcVersion)
|
||||
? QString(" for %1").arg(version.mcVersion)
|
||||
: "";
|
||||
ui->versionSelectionBox->addItem(QString("%1%2%3").arg(version.version, mcVersion, release_type),
|
||||
QVariant(version.downloadUrl));
|
||||
for (const auto& version : current.versions) {
|
||||
ui->versionSelectionBox->addItem(Flame::getVersionDisplayString(version), QVariant(version.downloadUrl));
|
||||
}
|
||||
|
||||
QVariant current_updated;
|
||||
|
|
|
@ -244,14 +244,8 @@ void ModrinthPage::onSelectionChanged(QModelIndex curr, [[maybe_unused]] QModelI
|
|||
else
|
||||
++it;
|
||||
#endif
|
||||
for (auto version : current.versions) {
|
||||
auto release_type = version.version_type.isValid() ? QString(" [%1]").arg(version.version_type.toString()) : "";
|
||||
auto mcVersion = !version.gameVersion.isEmpty() && !version.name.contains(version.gameVersion)
|
||||
? QString(" for %1").arg(version.gameVersion)
|
||||
: "";
|
||||
auto versionStr = !version.name.contains(version.version) ? version.version : "";
|
||||
ui->versionSelectionBox->addItem(QString("%1%2 — %3%4").arg(version.name, mcVersion, versionStr, release_type),
|
||||
QVariant(version.id));
|
||||
for (const auto& version : current.versions) {
|
||||
ui->versionSelectionBox->addItem(Modrinth::getVersionDisplayString(version), QVariant(version.id));
|
||||
}
|
||||
|
||||
QVariant current_updated;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue