NOISSUE Filter all pack's by name to search for modpacks.ch

modpacks.ch searching has changed, and while likely a bug - we may as
well make this change while we fetch all packs anyway. This makes MMC
more reactive for searchs for the platform.

This should be reverted if/when the modpacks.ch hits a size where we
need to restrict how many packs are fetched.
This commit is contained in:
Jamie Mansfield
2021-10-16 23:31:27 +01:00
parent 6cc7788b4a
commit 175132539b
6 changed files with 39 additions and 51 deletions

View File

@@ -30,13 +30,13 @@ public:
int columnCount(const QModelIndex &parent) const override;
QVariant data(const QModelIndex &index, int role) const override;
void request();
void getLogo(const QString &logo, const QString &logoUrl, LogoCallback callback);
void searchWithTerm(const QString & term);
private slots:
void performSearch();
void searchRequestFinished();
void searchRequestFailed(QString reason);
void requestFinished();
void requestFailed(QString reason);
void requestPack();
void packRequestFinished();
@@ -52,14 +52,6 @@ private:
QList<ModpacksCH::Modpack> modpacks;
LogoMap m_logoMap;
QString currentSearchTerm;
enum SearchState {
None,
CanPossiblyFetchMore,
ResetRequested,
Finished,
Failed,
} searchState = None;
NetJobPtr jobPtr;
int currentPack;
QList<int> remainingPacks;