aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui')
-rw-r--r--launcher/ui/pages/modplatform/ModModel.cpp8
-rw-r--r--launcher/ui/pages/modplatform/ModModel.h3
2 files changed, 5 insertions, 6 deletions
diff --git a/launcher/ui/pages/modplatform/ModModel.cpp b/launcher/ui/pages/modplatform/ModModel.cpp
index f75d2847..1998fe99 100644
--- a/launcher/ui/pages/modplatform/ModModel.cpp
+++ b/launcher/ui/pages/modplatform/ModModel.cpp
@@ -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;
}
diff --git a/launcher/ui/pages/modplatform/ModModel.h b/launcher/ui/pages/modplatform/ModModel.h
index dbadbeee..1b7601c2 100644
--- a/launcher/ui/pages/modplatform/ModModel.h
+++ b/launcher/ui/pages/modplatform/ModModel.h
@@ -7,6 +7,7 @@
#include "net/NetJob.h"
class ModPage;
+class Version;
namespace ModPlatform {
@@ -62,7 +63,7 @@ class ListModel : public QAbstractListModel {
void requestLogo(QString file, QString url);
- inline auto getMineVersions() const -> QList<QString>;
+ inline auto getMineVersions() const -> std::list<Version>;
protected:
ModPage* m_parent;