aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/flame/FlameModModel.cpp
AgeCommit message (Collapse)Author
2023-01-13refactor: generalize mod models and APIs to resourcesflow
Firstly, this abstract away behavior in the mod download models that can also be applied to other types of resources into a superclass, allowing other resource types to be implemented without so much code duplication. For that, this also generalizes the APIs used (currently, ModrinthAPI and FlameAPI) to be able to make requests to other types of resources. It also does a general cleanup of both of those. In particular, this makes use of std::optional instead of invalid values for errors and, well, optional values :p This is a squash of some commits that were becoming too interlaced together to be cleanly separated. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01feat: lazy-load CF mod descriptionsflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-05-08adopt changes from #497 remappedRyan Cao
2022-03-14tidy: Fix clang-tidy issues on files changed in this PRflow
The checks used are roughly the same as the ones proposed in the clang-tidy PR (except perhaps that I used modernize-* instead of listing them individually,though I don't think this caused any readability detriments). In ModrinthModel.cpp and FlameModModel.cpp I ignored the modernize-avoid-c-arrays one, mostly because making the sorts array an std::array would most likely increase the code complexity because of the virtual function. Aside from that, the static_cast warning from Application.h was not dealt with, since it's not in this PR's scope.
2022-03-07fix: delete semicolons at the end of .cpp file's functionsflow
my lsp is weird sometimes
2022-03-07refactor: move things around so that related things are close togetherflow
This also adds some comments around ModModel.cpp and ModPage.cpp to add some ease of reading the code. Also move some things from headers to cpp files.
2022-03-07refactor: move more common code to base classflow
Also removes unused imports and organize the ModModel header
2022-03-07refactor: move NetJob away from ModModel to ModAPIflow
This is done so that 1. ModAPI behaves more like an actual API instead of just a helper, and 2. Allows for more easily creating other mod providers that may or may not use network tasks (foreshadowing lol)
2022-03-02refactor: move url creation for mods to modplatform/flow
Moves all things related to creating the URLs of the mod platforms that go to network tasks to a single place, so that: 1. Maintaining and fixing eventual issues is more straightforward. 2. Makes it possible to factor out more common code between the different modplatform pages
2022-03-02refactor: extract common code in mod pages and modelflow
This creates a hierarchy in which ModPage and ModModel are the parents of every mod provider, providing the basic functionality common to all of them. It also imposes a unique .ui file (they were already equal before, just duplicated basically) on all mod providers.
2022-03-02refactor: Use a single indexed pack for modsflow
Since there's little difference between them, let's remove duplication and merge them.
2022-02-27fix: Always tell Flame API which modloader we are usingflow
Fixes #206 partially. Although we don't list mods that have no compatibility with the mod loader we are using, mods that have support for both loaders still show up, and the versions for both the loaders are still shown. Also simplifies a little the logic in FlameModIndex::loadIndexedPackVersions
2022-01-19Reduce spaghettinesstimoreo
2022-01-18Various fixestimoreo
2022-01-16Added curseforge selectiontimoreo