1
0
mirror of synced 2025-01-18 00:56:49 +01:00

fix: Update all task progress not increasing correctly

This commit is contained in:
WerWolv 2024-03-10 18:59:35 +01:00
parent 1d219ba511
commit d817a813b0

View File

@ -198,7 +198,6 @@ namespace hex::plugin::builtin {
ImGui::BeginDisabled(m_updateAllTask.isRunning() || m_updateCount == 0);
if (ImGuiExt::IconButton(ICON_VS_CLOUD_DOWNLOAD, ImGui::GetStyleColorVec4(ImGuiCol_Text))) {
m_updateAllTask = TaskManager::createTask("Update All...", m_updateCount, [this](auto &task) {
u32 progress = 0;
for (auto &category : m_categories) {
for (auto &entry : category.entries) {
if (entry.hasUpdate) {
@ -212,7 +211,7 @@ namespace hex::plugin::builtin {
std::this_thread::sleep_for(10ms);
}
task.update(progress);
task.increment();
}
}
}