From 34230bfcf415b4ad314d2534e09b40058ef9eaa2 Mon Sep 17 00:00:00 2001 From: flow Date: Wed, 7 Dec 2022 18:05:46 -0300 Subject: [PATCH] fix: don't try updating Flame instance names when updating versions Since the exact version string is only available in the manifest, there's no easy way of getting it before commiting to the update, so there's not much of a good way of showing the updated name in the UI, and using the displayName is weird and gives some buggy behavior. We may want to re-enable it in the future if we find a reliable way of showing the correct info on the UI before starting the update. Signed-off-by: flow --- launcher/modplatform/flame/FlameInstanceCreationTask.cpp | 8 -------- launcher/ui/pages/instance/ManagedPackPage.cpp | 5 +---- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/launcher/modplatform/flame/FlameInstanceCreationTask.cpp b/launcher/modplatform/flame/FlameInstanceCreationTask.cpp index 1e76f252..eae66ec7 100644 --- a/launcher/modplatform/flame/FlameInstanceCreationTask.cpp +++ b/launcher/modplatform/flame/FlameInstanceCreationTask.cpp @@ -385,14 +385,6 @@ bool FlameCreationTask::createInstance() setAbortable(false); auto inst = m_instance.value(); - // Only change the name if it didn't use a custom name, so that the previous custom name - // is preserved, but if we're using the original one, we update the version string. - // NOTE: This needs to come before the copyManagedPack call! - if (inst->name().contains(inst->getManagedPackVersionName())) { - if (askForChangingInstanceName(m_parent, inst->name(), instance.name()) == InstanceNameChange::ShouldChange) - inst->setName(instance.name()); - } - inst->copyManagedPack(instance); } diff --git a/launcher/ui/pages/instance/ManagedPackPage.cpp b/launcher/ui/pages/instance/ManagedPackPage.cpp index c70d70ab..7a0d234c 100644 --- a/launcher/ui/pages/instance/ManagedPackPage.cpp +++ b/launcher/ui/pages/instance/ManagedPackPage.cpp @@ -418,10 +418,7 @@ void FlameManagedPackPage::update() auto extracted = new InstanceImportTask(version.downloadUrl, this, std::move(extra_info)); - InstanceName inst_name(m_inst->getManagedPackName(), version.version); - inst_name.setName(m_inst->name().replace(m_inst->getManagedPackVersionName(), version.version)); - extracted->setName(inst_name); - + extracted->setName(m_inst->name()); extracted->setGroup(APPLICATION->instances()->getInstanceGroup(m_inst->id())); extracted->setIcon(m_inst->iconKey()); extracted->setConfirmUpdate(false);