mirror of
https://github.com/PrismLauncher/PrismLauncher
synced 2026-04-23 09:05:03 +00:00
add a option to skip meta refresh on launch (#5267)
This commit is contained in:
commit
519d8f7385
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue