mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
Add ModpackUpdatePromptDisabled setting
When creating an instance of a modpack that's already associated with another instance, the user gets asked if they want to update that instance instead. This commit introduces a setting to suppress the prompt and directly create the new instance. Signed-off-by: Kationor <n96211028@gmail.com>
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
#include "InstanceTask.h"
|
||||
|
||||
#include "Application.h"
|
||||
#include "settings/SettingsObject.h"
|
||||
#include "ui/dialogs/CustomMessageBox.h"
|
||||
|
||||
#include <QPushButton>
|
||||
@ -22,6 +24,9 @@ InstanceNameChange askForChangingInstanceName(QWidget* parent, const QString& ol
|
||||
|
||||
ShouldUpdate askIfShouldUpdate(QWidget* parent, QString original_version_name)
|
||||
{
|
||||
if (APPLICATION->settings()->get("ModpackUpdatePromptDisabled").toBool())
|
||||
return ShouldUpdate::SkipUpdating;
|
||||
|
||||
auto info = CustomMessageBox::selectable(
|
||||
parent, QObject::tr("Similar modpack was found!"),
|
||||
QObject::tr(
|
||||
|
Reference in New Issue
Block a user