refactor: move url creation for mods to modplatform/
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
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
|
||||
#include "ui/pages/modplatform/ModPage.h"
|
||||
|
||||
#include "modplatform/modrinth/ModrinthAPI.h"
|
||||
|
||||
class ModrinthPage : public ModPage {
|
||||
Q_OBJECT
|
||||
|
||||
@ -18,7 +20,11 @@ class ModrinthPage : public ModPage {
|
||||
inline QString metaEntryBase() const override { return "ModrinthPacks"; };
|
||||
|
||||
bool shouldDisplay() const override;
|
||||
const ModAPI* apiProvider() const override { return &api; };
|
||||
|
||||
private:
|
||||
void onModVersionSucceed(ModPage*, QByteArray*, QString) override;
|
||||
|
||||
private:
|
||||
ModrinthAPI api;
|
||||
};
|
||||
|
Reference in New Issue
Block a user