feat: make second metadata pass concurrent

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow 2022-07-01 16:17:05 -03:00
parent 58dc3e93d3
commit 47bdcb6050
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469
2 changed files with 5 additions and 2 deletions

View File

@ -8,6 +8,8 @@
#include "FileSystem.h"
#include "Json.h"
#include "tasks/ConcurrentTask.h"
#include "minecraft/MinecraftInstance.h"
#include "minecraft/PackProfile.h"
@ -39,7 +41,7 @@ ModUpdateDialog::ModUpdateDialog(QWidget* parent,
, m_parent(parent)
, m_mod_model(mods)
, m_candidates(search_for)
, m_second_try_metadata(new SequentialTask())
, m_second_try_metadata(new ConcurrentTask())
, m_instance(instance)
{
ReviewMessageBox::setGeometry(0, 0, 800, 600);

View File

@ -11,6 +11,7 @@
class Mod;
class ModrinthCheckUpdate;
class FlameCheckUpdate;
class ConcurrentTask;
class ModUpdateDialog final : public ReviewMessageBox {
Q_OBJECT
@ -49,7 +50,7 @@ class ModUpdateDialog final : public ReviewMessageBox {
std::list<Mod*> m_modrinth_to_update;
std::list<Mod*> m_flame_to_update;
SequentialTask* m_second_try_metadata;
ConcurrentTask* m_second_try_metadata;
std::list<std::tuple<Mod*, QString>> m_failed_metadata;
std::list<std::tuple<Mod*, QString, QUrl>> m_failed_check_update;