diff options
author | flow <flowlnlnln@gmail.com> | 2022-10-13 13:49:06 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2022-10-13 13:49:06 -0300 |
commit | f26be005716818b643a0c8b1373dbe83e4cdcfbf (patch) | |
tree | 68e7955f4dc13f0c393b282efad9f98c44dcb57d /launcher/ui/pages/modplatform/ftb/FtbListModel.h | |
parent | 83654a193e8856e00bcdbe4f87d209e52c380a62 (diff) | |
download | PrismLauncher-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.h | 5 |
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; |