diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-14 23:45:40 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-14 23:45:40 +0300 |
commit | ab10524cd763ab9e7796608d40682fdb70912fd0 (patch) | |
tree | b216ed5330a5a1c79018ad3deb073f5cfac05bb1 /launcher/ui/dialogs/ResourceDownloadDialog.cpp | |
parent | 1ccfba13ebe11a1d6ea2897db45b47c2452931f5 (diff) | |
parent | 37fb52aada16fa8533ecee3932e10fcbee0ca1d5 (diff) | |
download | PrismLauncher-ab10524cd763ab9e7796608d40682fdb70912fd0.tar.gz PrismLauncher-ab10524cd763ab9e7796608d40682fdb70912fd0.tar.bz2 PrismLauncher-ab10524cd763ab9e7796608d40682fdb70912fd0.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into export
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/ui/dialogs/ResourceDownloadDialog.cpp')
-rw-r--r-- | launcher/ui/dialogs/ResourceDownloadDialog.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/launcher/ui/dialogs/ResourceDownloadDialog.cpp b/launcher/ui/dialogs/ResourceDownloadDialog.cpp index 4f59f560..b17eced3 100644 --- a/launcher/ui/dialogs/ResourceDownloadDialog.cpp +++ b/launcher/ui/dialogs/ResourceDownloadDialog.cpp @@ -43,6 +43,8 @@ #include "ui/pages/modplatform/flame/FlameResourcePages.h" #include "ui/pages/modplatform/modrinth/ModrinthResourcePages.h" +#include "modplatform/flame/FlameAPI.h" +#include "modplatform/modrinth/ModrinthAPI.h" #include "ui/widgets/PageContainer.h" namespace ResourceDownload { @@ -281,8 +283,11 @@ QList<BasePage*> ModDownloadDialog::getPages() { QList<BasePage*> pages; - pages.append(ModrinthModPage::create(this, *m_instance)); - if (APPLICATION->capabilities() & Application::SupportsFlame) + auto loaders = static_cast<MinecraftInstance*>(m_instance)->getPackProfile()->getModLoaders().value(); + + if (ModrinthAPI::validateModLoaders(loaders)) + pages.append(ModrinthModPage::create(this, *m_instance)); + if (APPLICATION->capabilities() & Application::SupportsFlame && FlameAPI::validateModLoaders(loaders)) pages.append(FlameModPage::create(this, *m_instance)); m_selectedPage = dynamic_cast<ModPage*>(pages[0]); |