mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2025-01-16 04:13:11 +00:00
NOISSUE Fix release date check
This commit is contained in:
parent
72e62058c0
commit
39780c7238
@ -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
|
// 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);
|
auto mcInstance = std::dynamic_pointer_cast<MinecraftInstance>(instance);
|
||||||
if (mcInstance)
|
if (mcInstance)
|
||||||
{
|
{
|
||||||
@ -52,6 +54,7 @@ CreateShortcutDialog::CreateShortcutDialog(QWidget *parent, InstancePtr instance
|
|||||||
|
|
||||||
if (mcInstance->getPackProfile()->getComponent("net.minecraft")->getReleaseDateTime() >= g_VersionFilterData.quickPlayBeginsDate)
|
if (mcInstance->getPackProfile()->getComponent("net.minecraft")->getReleaseDateTime() >= g_VersionFilterData.quickPlayBeginsDate)
|
||||||
{
|
{
|
||||||
|
instanceSupportsQuickPlay = true;
|
||||||
mcInstance->worldList()->update();
|
mcInstance->worldList()->update();
|
||||||
for (const auto &world : mcInstance->worldList()->allWorlds())
|
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->joinServerRadioButton->setChecked(true);
|
||||||
ui->joinSingleplayerRadioButton->setVisible(false);
|
ui->joinSingleplayerRadioButton->setVisible(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user