Don't use .index for shaderpacks

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2026-01-06 15:00:31 +00:00
parent d6942089cd
commit 1cf48dfd85
5 changed files with 82 additions and 2 deletions

View File

@@ -23,6 +23,7 @@
#include "modplatform/flame/FlameAPI.h"
#include "modplatform/flame/FlameModIndex.h"
#include "settings/Setting.h"
#include "tasks/SequentialTask.h"
#include "tasks/Task.h"
#include "ui/dialogs/CustomMessageBox.h"
@@ -334,7 +335,17 @@ bool ResourceFolderModel::update()
},
Qt::ConnectionType::QueuedConnection);
QThreadPool::globalInstance()->start(m_current_update_task.get());
auto task = new SequentialTask("ResourceFolderModel::update");
Task::Ptr preUpdate(createPreUpdateTask());
if (preUpdate != nullptr)
task->addTask(preUpdate);
task->addTask(m_current_update_task);
connect(task, &Task::finished, [task] { task->deleteLater(); });
QThreadPool::globalInstance()->start(task);
return true;
}