NOISSUE Fix release date check

This commit is contained in:
arthomnix 2023-05-23 16:52:27 +01:00
parent 72e62058c0
commit 39780c7238

View File

@ -45,6 +45,8 @@ CreateShortcutDialog::CreateShortcutDialog(QWidget *parent, InstancePtr instance
// TODO: check if version is affected by crashing when joining servers on launch, ideally in meta
bool instanceSupportsQuickPlay = false;
auto mcInstance = std::dynamic_pointer_cast<MinecraftInstance>(instance);
if (mcInstance)
{
@ -52,6 +54,7 @@ CreateShortcutDialog::CreateShortcutDialog(QWidget *parent, InstancePtr instance
if (mcInstance->getPackProfile()->getComponent("net.minecraft")->getReleaseDateTime() >= g_VersionFilterData.quickPlayBeginsDate)
{
instanceSupportsQuickPlay = true;
mcInstance->worldList()->update();
for (const auto &world : mcInstance->worldList()->allWorlds())
{
@ -59,7 +62,8 @@ CreateShortcutDialog::CreateShortcutDialog(QWidget *parent, InstancePtr instance
}
}
}
else
if (!instanceSupportsQuickPlay)
{
ui->joinServerRadioButton->setChecked(true);
ui->joinSingleplayerRadioButton->setVisible(false);