refactor: use Enum instead of raw int for ModLoaderType

This commit is contained in:
flow
2022-03-06 16:45:39 -03:00
parent d755174bee
commit 39bd04f06f
4 changed files with 42 additions and 6 deletions

View File

@ -125,7 +125,8 @@ void ListModel::performPaginatedSearch()
->getComponentVersion("net.fabricmc.fabric-loader")
.isEmpty();
auto netJob = new NetJob(QString("%1::Search").arg(m_parent->debugName()), APPLICATION->network());
auto searchUrl = m_parent->apiProvider()->getModSearchURL(nextSearchOffset, currentSearchTerm, getSorts()[currentSort], hasFabric, mcVersion);
auto searchUrl = m_parent->apiProvider()->getModSearchURL(
nextSearchOffset, currentSearchTerm, getSorts()[currentSort], hasFabric ? ModAPI::Fabric : ModAPI::Forge, mcVersion);
netJob->addNetAction(Net::Download::makeByteArray(QUrl(searchUrl), &response));
jobPtr = netJob;