aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/modrinth/ModrinthAPI.h
diff options
context:
space:
mode:
authorflow <thiagodonato300@gmail.com>2022-04-02 18:34:26 -0300
committerflow <thiagodonato300@gmail.com>2022-04-15 08:45:30 -0300
commitc730fd6e5f125cde324d110282ed33ea4b9df136 (patch)
tree1cb8af67958f28262c76a39d109f348c81ae84f1 /launcher/modplatform/modrinth/ModrinthAPI.h
parentc2b97c3e3f5ecb5a995b342c4e0afec6a1a3b2f6 (diff)
downloadPrismLauncher-c730fd6e5f125cde324d110282ed33ea4b9df136.tar.gz
PrismLauncher-c730fd6e5f125cde324d110282ed33ea4b9df136.tar.bz2
PrismLauncher-c730fd6e5f125cde324d110282ed33ea4b9df136.zip
feat: Use version filter when searching mods
Diffstat (limited to 'launcher/modplatform/modrinth/ModrinthAPI.h')
-rw-r--r--launcher/modplatform/modrinth/ModrinthAPI.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/launcher/modplatform/modrinth/ModrinthAPI.h b/launcher/modplatform/modrinth/ModrinthAPI.h
index eefa4a85..0d652568 100644
--- a/launcher/modplatform/modrinth/ModrinthAPI.h
+++ b/launcher/modplatform/modrinth/ModrinthAPI.h
@@ -27,7 +27,7 @@ class ModrinthAPI : public NetworkModAPI {
.arg(args.search)
.arg(args.sorting)
.arg(getModLoaderString(args.mod_loader))
- .arg(args.version);
+ .arg(getGameVersionsString(args.versions));
};
inline auto getVersionsURL(VersionSearchArgs& args) const -> QString override
@@ -40,17 +40,6 @@ class ModrinthAPI : public NetworkModAPI {
.arg(getModLoaderString(args.loader));
};
- inline auto getGameVersionsString(QList<QString> mcVersions) const -> QString
- {
- QString s;
- for(int i = 0; i < mcVersions.count(); i++){
- s += mcVersions.at(i);
- if(i < mcVersions.count() - 1)
- s += ",";
- }
- return s;
- }
-
static auto getModLoaderString(ModLoaderType type) -> const QString
{
if (type == Unspecified)