add a option to skip meta refresh on launch (#5267)

This commit is contained in:
Alexandru Ionut Tripon 2026-04-14 16:29:30 +00:00 committed by GitHub
commit 519d8f7385
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 4 deletions

View file

@ -871,6 +871,7 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
resetIfInvalid(m_settings->registerSetting("LegacyFMLLibsURLOverride", "").get());
}
m_settings->registerSetting("MetaRefreshOnLaunch", true);
m_settings->registerSetting("CloseAfterLaunch", false);
m_settings->registerSetting("QuitAfterGameStop", false);

View file

@ -15,6 +15,7 @@
#include "Index.h"
#include "Application.h"
#include "JsonFormat.h"
#include "QObjectPtr.h"
#include "VersionList.h"
@ -135,7 +136,7 @@ void Index::connectVersionList(const int row, const VersionList::Ptr& list)
Task::Ptr Index::loadVersion(const QString& uid, const QString& version, Net::Mode mode, bool force)
{
if (mode == Net::Mode::Offline) {
if (mode == Net::Mode::Offline || !APPLICATION->settings()->get("MetaRefreshOnLaunch").toBool()) {
return get(uid, version)->loadTask(mode);
}

View file

@ -143,6 +143,7 @@ void APIPage::loadSettings()
ui->msaClientID->setText(msaClientID);
QString metaURL = s->get("MetaURLOverride").toString();
ui->metaURL->setText(metaURL);
ui->metaRefreshOnLaunchCB->setCheckState(s->get("MetaRefreshOnLaunch").toBool() ? Qt::Checked : Qt::Unchecked);
QString resourceURL = s->get("ResourceURLOverride").toString();
ui->resourceURL->setText(resourceURL);
QString fmlLibsURL = s->get("LegacyFMLLibsURLOverride").toString();
@ -194,6 +195,7 @@ void APIPage::applySettings()
s->set("FallbackMRBlockedMods", ui->FallbackMRBlockedMods->checkState());
s->set("MetaURLOverride", metaURL.toString());
s->set("MetaRefreshOnLaunch", ui->metaRefreshOnLaunchCB->checkState() == Qt::Checked);
s->set("ResourceURLOverride", resourceURL.toString());
s->set("LegacyFMLLibsURLOverride", fmlLibsURL.toString());
QString flameKey = ui->flameKey->text();

View file

@ -32,9 +32,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-262</y>
<width>820</width>
<height>908</height>
<y>0</y>
<width>825</width>
<height>1236</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@ -126,6 +126,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="metaRefreshOnLaunchCB">
<property name="text">
<string>Refresh on launch</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>