diff options
author | flow <thiagodonato300@gmail.com> | 2022-03-02 18:35:59 -0300 |
---|---|---|
committer | flow <thiagodonato300@gmail.com> | 2022-03-02 18:49:19 -0300 |
commit | 881b2f2b385f19d9b64a149fca3c3741a803a172 (patch) | |
tree | ff13eabfeec171560c2b8b90aa00db6a48e92691 /launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp | |
parent | ca211558b5a4ee8b0dec3471c92f952002216532 (diff) | |
download | PrismLauncher-881b2f2b385f19d9b64a149fca3c3741a803a172.tar.gz PrismLauncher-881b2f2b385f19d9b64a149fca3c3741a803a172.tar.bz2 PrismLauncher-881b2f2b385f19d9b64a149fca3c3741a803a172.zip |
refactor: Use a single indexed pack for mods
Since there's little difference between them, let's remove duplication
and merge them.
Diffstat (limited to 'launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp')
-rw-r--r-- | launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp index 35cd743a..4dfc8504 100644 --- a/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp +++ b/launcher/ui/pages/modplatform/modrinth/ModrinthPage.cpp @@ -76,7 +76,7 @@ void ModrinthPage::onSelectionChanged(QModelIndex first, QModelIndex second) { return; } - current = listModel->data(first, Qt::UserRole).value<Modrinth::IndexedPack>(); + current = listModel->data(first, Qt::UserRole).value<ModPlatform::IndexedPack>(); QString text = ""; QString name = current.name; @@ -84,8 +84,8 @@ void ModrinthPage::onSelectionChanged(QModelIndex first, QModelIndex second) { text = name; else text = "<a href=\"" + current.websiteUrl + "\">" + name + "</a>"; - text += "<br>" + tr(" by ") + "<a href=\"" + current.author.url + "\">" + - current.author.name + "</a><br><br>"; + text += "<br>" + tr(" by ") + "<a href=\"" + current.authors[0].url + "\">" + + current.authors[0].name + "</a><br><br>"; ui->packDescription->setHtml(text + current.description); if (!current.versionsLoaded) { @@ -98,7 +98,7 @@ void ModrinthPage::onSelectionChanged(QModelIndex first, QModelIndex second) { new NetJob(QString("Modrinth::ModVersions(%1)").arg(current.name), APPLICATION->network()); auto response = new QByteArray(); - QString addonId = current.addonId; + QString addonId = current.addonId.toString(); netJob->addNetAction(Net::Download::makeByteArray( QString("https://api.modrinth.com/v2/project/%1/version").arg(addonId), response)); |