fix: abort search if we're already trying to download a pack

Meaning we don't have to wait for the searches to finish in the
background to finally start the modpack download, when we have already
selected it -_-

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-10-13 13:49:06 -03:00
parent 83654a193e
commit f26be00571
5 changed files with 31 additions and 0 deletions

View File

@ -47,9 +47,12 @@ public:
QVariant data(const QModelIndex &index, int role) const override;
void request();
void abortRequest();
void getLogo(const QString &logo, const QString &logoUrl, LogoCallback callback);
[[nodiscard]] bool isMakingRequest() const { return jobPtr.get(); }
private slots:
void requestFinished();
void requestFailed(QString reason);
@ -65,6 +68,8 @@ private:
void requestLogo(QString file, QString url);
private:
bool m_aborted = false;
QList<ModpacksCH::Modpack> modpacks;
LogoMap m_logoMap;