Reduce spaghettiness

This commit is contained in:
timoreo 2022-01-19 09:47:09 +01:00
parent affc2521aa
commit 6d22794cf9
No known key found for this signature in database
GPG Key ID: 121A72C3512BA288
2 changed files with 14 additions and 2 deletions

View File

@ -177,7 +177,13 @@ void ListModel::performPaginatedSearch()
"sort=%3&"
"%4"
"gameVersion=%5"
).arg(nextSearchOffset).arg(currentSearchTerm).arg(sorts[currentSort]).arg(hasFabric ? "modLoaderType=4&" : "").arg(mcVersion);
)
.arg(nextSearchOffset)
.arg(currentSearchTerm)
.arg(sorts[currentSort])
.arg(hasFabric ? "modLoaderType=4&" : "")
.arg(mcVersion);
netJob->addNetAction(Net::Download::makeByteArray(QUrl(searchUrl), &response));
jobPtr = netJob;
jobPtr->start();

View File

@ -172,7 +172,13 @@ void ListModel::performPaginatedSearch()
"query=%2&"
"index=%3&"
"filters=categories=\"%4\" AND versions=\"%5\""
).arg(nextSearchOffset).arg(currentSearchTerm).arg(sorts[currentSort]).arg(hasFabric ? "fabric" : "forge").arg(mcVersion);
)
.arg(nextSearchOffset)
.arg(currentSearchTerm)
.arg(sorts[currentSort])
.arg(hasFabric ? "fabric" : "forge")
.arg(mcVersion);
netJob->addNetAction(Net::Download::makeByteArray(QUrl(searchUrl), &response));
jobPtr = netJob;
jobPtr->start();