Added categories filter
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
35d62cc5f2
commit
41c9ca4f8a
16 changed files with 230 additions and 6 deletions
|
@ -141,4 +141,15 @@ unique_qobject_ptr<ModFilterWidget> ModrinthModPage::createFilterWidget()
|
|||
{
|
||||
return ModFilterWidget::create(&static_cast<MinecraftInstance&>(m_base_instance), true, this);
|
||||
}
|
||||
|
||||
void ModrinthModPage::prepareProviderCategories()
|
||||
{
|
||||
auto response = std::make_shared<QByteArray>();
|
||||
auto task = ModrinthAPI::getModCategories(response);
|
||||
QObject::connect(task.get(), &Task::succeeded, [this, response]() {
|
||||
auto categories = ModrinthAPI::loadModCategories(response);
|
||||
m_filter_widget->setCategories(categories);
|
||||
});
|
||||
task->start();
|
||||
};
|
||||
} // namespace ResourceDownload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue