aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/ModModel.h
AgeCommit message (Collapse)Author
2022-11-14Check parent in rowCount/columnCount/canFetchMoreTheLastRar
Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
2022-11-14Mark loadExtraPackInfo abstractTheLastRar
All classes that inherit from ModModel override this method Signed-off-by: TheLastRar <TheLastRar@users.noreply.github.com>
2022-10-24fix: retry mod search job after aborting itflow
This way, we don't get stuck with an aborted job in our way! :o Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01fix: prevent segfault due to callbacks into deleted objectsflow
Since network requests are, for the most part, asynchronous, there's a chance a request only comes through after the request sender has already been deleted. This adds a global (read static) hash table relating models for the mod downloader to their status (true = alive, false = destroyed). It is a bit of a hack, but I couldn't come up with a better way of doing this. To reproduce the issue before this commit: scroll really quickly through CF mods, to trigger network requests for their versions and description. Then, in the middle of it close the mod downloader. Sometimes this will create a crash. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01feat: cache mod versionsflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01feat: cache extra mod info (like links and body)flow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01feat+refactor: clean up ProgressWidget and add progress indicatior toflow
mod downloader Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01feat: create delegate for project item viewsflow
This allows us to define custom painting for list view items. In particular, this is applied to the mod downloader, in order to allow displaying both the mod name and mod description, and settings their effects (like bold or underline) independent of each other. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-05-24feat: add donate links for modrinth modsflow
2022-04-15rework: make the filter as a tabbed widget in the dialog itselfflow
Still needs a clear indication that the filter only applies after you click the search button...
2022-04-15fix(ui): Refresh mod list when changing filtering optionsflow
2022-04-15feat: Use version filter when searching modsflow
2022-04-07fix: check for Quilt as Fabric-compatible loaderSefa Eyeoglu
2022-03-24optimize: Improve mod versions request to Modrinthflow
This uses more arguments in the GET request for mod versions on the Modrinth API, filtering what versions can be returned, decreasing load on Modrinth servers and improving a little the time it takes for the versions to be available to the user. This also removes the now unneeded check on correct modloaders in ModrinthPackIndex, since it is now filtered by the Modrinth server. Lastly, this adds a couple of helper functions in ModModel.
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-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: de-duplicate common code in network mod APIsflow
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-06clarify some method names and commentsflow
2022-03-06refactor: move "get versions" task from page to modelflow
This seems more reasonable
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.