aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/ftb/FtbListModel.h
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-10-13 13:49:06 -0300
committerflow <flowlnlnln@gmail.com>2022-10-13 13:49:06 -0300
commitf26be005716818b643a0c8b1373dbe83e4cdcfbf (patch)
tree68e7955f4dc13f0c393b282efad9f98c44dcb57d /launcher/ui/pages/modplatform/ftb/FtbListModel.h
parent83654a193e8856e00bcdbe4f87d209e52c380a62 (diff)
downloadPrismLauncher-f26be005716818b643a0c8b1373dbe83e4cdcfbf.tar.gz
PrismLauncher-f26be005716818b643a0c8b1373dbe83e4cdcfbf.tar.bz2
PrismLauncher-f26be005716818b643a0c8b1373dbe83e4cdcfbf.zip
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>
Diffstat (limited to 'launcher/ui/pages/modplatform/ftb/FtbListModel.h')
-rw-r--r--launcher/ui/pages/modplatform/ftb/FtbListModel.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/launcher/ui/pages/modplatform/ftb/FtbListModel.h b/launcher/ui/pages/modplatform/ftb/FtbListModel.h
index 314cb789..cbf215c4 100644
--- a/launcher/ui/pages/modplatform/ftb/FtbListModel.h
+++ b/launcher/ui/pages/modplatform/ftb/FtbListModel.h
@@ -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;