From 82699cc297de64fe6e39404dae29ad812766aba0 Mon Sep 17 00:00:00 2001 From: flow Date: Fri, 14 Oct 2022 14:23:55 -0300 Subject: feat: allow skipping the update confirmation dialog Signed-off-by: flow --- .../modplatform/modrinth/ModrinthInstanceCreationTask.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'launcher/modplatform/modrinth/ModrinthInstanceCreationTask.cpp') diff --git a/launcher/modplatform/modrinth/ModrinthInstanceCreationTask.cpp b/launcher/modplatform/modrinth/ModrinthInstanceCreationTask.cpp index 762feef6..5eb28a85 100644 --- a/launcher/modplatform/modrinth/ModrinthInstanceCreationTask.cpp +++ b/launcher/modplatform/modrinth/ModrinthInstanceCreationTask.cpp @@ -49,12 +49,14 @@ bool ModrinthCreationTask::updateInstance() auto version_name = inst->getManagedPackVersionName(); auto version_str = !version_name.isEmpty() ? tr(" (version %1)").arg(version_name) : ""; - auto should_update = askIfShouldUpdate(m_parent, version_str); - if (should_update == ShouldUpdate::SkipUpdating) - return false; - if (should_update == ShouldUpdate::Cancel) { - m_abort = true; - return false; + if (shouldConfirmUpdate()) { + auto should_update = askIfShouldUpdate(m_parent, version_str); + if (should_update == ShouldUpdate::SkipUpdating) + return false; + if (should_update == ShouldUpdate::Cancel) { + m_abort = true; + return false; + } } // Remove repeated files, we don't need to download them! -- cgit