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 <flowlnlnln@gmail.com>
This commit is contained in:
flow 2022-12-07 18:05:46 -03:00
parent 6f50809457
commit 34230bfcf4
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469
2 changed files with 1 additions and 12 deletions

View File

@ -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);
}

View File

@ -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);