feat: add mod update dialog

This subclasses the Review mods dialog to make a "Update review" one.
Also, all the necessary components built until now are put together in a
coherent unity that checks and generates metadata on-the-fly and checks for
mod updates, while giving and receiving feedback to the user.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-06-04 16:22:46 -03:00
parent b8b71c7dd2
commit 6e2869834f
6 changed files with 390 additions and 16 deletions

View File

@ -81,11 +81,14 @@ void ModrinthCheckUpdate::executeTask()
try {
for (auto hash : mappings.keys()) {
auto project_obj = doc[hash].toObject();
// If the returned project is empty, but we have Modrinth metadata,
// it means this specific version is not available
if (project_obj.isEmpty()) {
qDebug() << "Mod " << mappings.find(hash).value().name() << " got an empty response.";
qDebug() << "Hash: " << hash;
emit checkFailed(mappings.find(hash).value(), tr("Couldn't find mod in Modrinth"));
emit checkFailed(mappings.find(hash).value(), tr("Couldn't find the latest version of this mod with the correct mod loader and game version."));
continue;
}