Merge pull request #634 from flowln/donate_links
More links for CF / Modrinth mods / modpacks
This commit is contained in:
@ -96,6 +96,11 @@ void ListModel::performPaginatedSearch()
|
||||
this, { nextSearchOffset, currentSearchTerm, getSorts()[currentSort], profile->getModLoaders(), getMineVersions() });
|
||||
}
|
||||
|
||||
void ListModel::requestModInfo(ModPlatform::IndexedPack& current)
|
||||
{
|
||||
m_parent->apiProvider()->getModInfo(this, current);
|
||||
}
|
||||
|
||||
void ListModel::refresh()
|
||||
{
|
||||
if (jobPtr) {
|
||||
@ -242,6 +247,21 @@ void ListModel::searchRequestFailed(QString reason)
|
||||
}
|
||||
}
|
||||
|
||||
void ListModel::infoRequestFinished(QJsonDocument& doc, ModPlatform::IndexedPack& pack)
|
||||
{
|
||||
qDebug() << "Loading mod info";
|
||||
|
||||
try {
|
||||
auto obj = Json::requireObject(doc);
|
||||
loadExtraPackInfo(pack, obj);
|
||||
} catch (const JSONValidationError& e) {
|
||||
qDebug() << doc;
|
||||
qWarning() << "Error while reading " << debugName() << " mod info: " << e.cause();
|
||||
}
|
||||
|
||||
m_parent->updateUi();
|
||||
}
|
||||
|
||||
void ListModel::versionRequestSucceeded(QJsonDocument doc, QString addonId)
|
||||
{
|
||||
auto& current = m_parent->getCurrent();
|
||||
|
Reference in New Issue
Block a user