feat: Use version filter when searching mods
This commit is contained in:
@ -72,7 +72,7 @@ void ListModel::performPaginatedSearch()
|
||||
auto profile = (dynamic_cast<MinecraftInstance*>((dynamic_cast<ModPage*>(parent()))->m_instance))->getPackProfile();
|
||||
|
||||
m_parent->apiProvider()->searchMods(this,
|
||||
{ nextSearchOffset, currentSearchTerm, getSorts()[currentSort], profile->getModLoader(), getMineVersions().at(0) });
|
||||
{ nextSearchOffset, currentSearchTerm, getSorts()[currentSort], profile->getModLoader(), getMineVersions() });
|
||||
}
|
||||
|
||||
void ListModel::searchWithTerm(const QString& term, const int sort)
|
||||
@ -223,9 +223,7 @@ void ListModel::versionRequestSucceeded(QJsonDocument doc, QString addonId)
|
||||
|
||||
/******** Helpers ********/
|
||||
|
||||
auto ModPlatform::ListModel::getMineVersions() const -> QList<QString>
|
||||
auto ModPlatform::ListModel::getMineVersions() const -> std::list<Version>
|
||||
{
|
||||
return { (dynamic_cast<MinecraftInstance*>((dynamic_cast<ModPage*>(parent()))->m_instance))
|
||||
->getPackProfile()
|
||||
->getComponentVersion("net.minecraft") };
|
||||
return m_parent->getFilter()->versions;
|
||||
}
|
||||
|
Reference in New Issue
Block a user