feat: add mod index updating to ModDownloadTask
This makes ModDownloadTask into a SequentialTask with 2 subtasks: Downloading the mod files and updating the index with the new information. The index updating is done first so that, in the future, we can prompt the user before download if, for instance, we discover there's another version already installed.
This commit is contained in:
parent
b30b88716e
commit
c86c719e1a
3 changed files with 25 additions and 28 deletions
|
@ -150,7 +150,7 @@ void ModPage::onModSelected()
|
|||
if (dialog->isModSelected(current.name, version.fileName)) {
|
||||
dialog->removeSelectedMod(current.name);
|
||||
} else {
|
||||
dialog->addSelectedMod(current.name, new ModDownloadTask(version.downloadUrl, version.fileName, dialog->mods));
|
||||
dialog->addSelectedMod(current.name, new ModDownloadTask(current, version, dialog->mods));
|
||||
}
|
||||
|
||||
updateSelectionButton();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue