feat: cache extra mod info (like links and body)
Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
@ -28,6 +28,7 @@ class ListModel : public QAbstractListModel {
|
||||
|
||||
/* Retrieve information from the model at a given index with the given role */
|
||||
auto data(const QModelIndex& index, int role) const -> QVariant override;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
||||
|
||||
inline void setActiveJob(NetJob::Ptr ptr) { jobPtr = ptr; }
|
||||
inline NetJob* activeJob() { return jobPtr.get(); }
|
||||
@ -36,7 +37,7 @@ class ListModel : public QAbstractListModel {
|
||||
void fetchMore(const QModelIndex& parent) override;
|
||||
void refresh();
|
||||
void searchWithTerm(const QString& term, const int sort, const bool filter_changed);
|
||||
void requestModInfo(ModPlatform::IndexedPack& current);
|
||||
void requestModInfo(ModPlatform::IndexedPack& current, QModelIndex index);
|
||||
void requestModVersions(const ModPlatform::IndexedPack& current);
|
||||
|
||||
virtual void loadIndexedPack(ModPlatform::IndexedPack& m, QJsonObject& obj) = 0;
|
||||
@ -51,7 +52,7 @@ class ListModel : public QAbstractListModel {
|
||||
void searchRequestFinished(QJsonDocument& doc);
|
||||
void searchRequestFailed(QString reason);
|
||||
|
||||
void infoRequestFinished(QJsonDocument& doc, ModPlatform::IndexedPack& pack);
|
||||
void infoRequestFinished(QJsonDocument& doc, ModPlatform::IndexedPack& pack, const QModelIndex& index);
|
||||
|
||||
void versionRequestSucceeded(QJsonDocument doc, QString addonId);
|
||||
|
||||
|
Reference in New Issue
Block a user