make universal resource type (#3541)

This commit is contained in:
Alexandru Ionut Tripon
2025-07-22 13:31:05 +03:00
committed by GitHub
23 changed files with 143 additions and 81 deletions

View File

@@ -188,7 +188,7 @@ void ListModel::performPaginatedSearch()
auto netJob = makeShared<NetJob>("Flame::Search", APPLICATION->network());
auto searchUrl =
FlameAPI().getSearchURL({ ModPlatform::ResourceType::MODPACK, nextSearchOffset, currentSearchTerm, sort, m_filter->loaders,
FlameAPI().getSearchURL({ ModPlatform::ResourceType::Modpack, nextSearchOffset, currentSearchTerm, sort, m_filter->loaders,
m_filter->versions, ModPlatform::Side::NoSide, m_filter->categoryIds, m_filter->openSource });
netJob->addNetAction(Net::ApiDownload::makeByteArray(QUrl(searchUrl.value()), response));

View File

@@ -350,7 +350,7 @@ void FlamePage::createFilterWidget()
connect(m_filterWidget.get(), &ModFilterWidget::filterChanged, this, &FlamePage::triggerSearch);
auto response = std::make_shared<QByteArray>();
m_categoriesTask = FlameAPI::getCategories(response, ModPlatform::ResourceType::MODPACK);
m_categoriesTask = FlameAPI::getCategories(response, ModPlatform::ResourceType::Modpack);
connect(m_categoriesTask.get(), &Task::succeeded, [this, response]() {
auto categories = FlameAPI::loadModCategories(response);
m_filterWidget->setCategories(categories);