aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.cpp
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-12-20 12:15:17 -0300
committerflow <flowlnlnln@gmail.com>2023-01-13 16:23:07 -0300
commit36571c5e2237c98e194cff326480ebe3e661c586 (patch)
tree7a7bb0f1df380ded2ed6be227f61ef01e86c6e77 /launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.cpp
parentc8eca4fb8508a22b9d4819d57627dd684f8d98c5 (diff)
downloadPrismLauncher-36571c5e2237c98e194cff326480ebe3e661c586.tar.gz
PrismLauncher-36571c5e2237c98e194cff326480ebe3e661c586.tar.bz2
PrismLauncher-36571c5e2237c98e194cff326480ebe3e661c586.zip
refactor(RD): clear up sorting methods
This refactors the sorting methods to join every bit of it into a single list, easing maintanance. It also removes the weird index contraint on the list of methods by adding an index field to the DS that holds the method. Lastly, it puts the available methods on their respective API, so other resources on the same API can re-use them later on. Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.cpp')
-rw-r--r--launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.cpp
index 895e23fd..06b72fd0 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.cpp
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthResourceModels.cpp
@@ -23,9 +23,6 @@
namespace ResourceDownload {
-// NOLINTNEXTLINE(modernize-avoid-c-arrays)
-const char* ModrinthModModel::sorts[5]{ "relevance", "downloads", "follows", "updated", "newest" };
-
ModrinthModModel::ModrinthModModel(BaseInstance const& base) : ModModel(base, new ModrinthAPI) {}
void ModrinthModModel::loadIndexedPack(ModPlatform::IndexedPack& m, QJsonObject& obj)