Launcher: don’t update already updating aircraft
This commit is contained in:
parent
abbaf8f640
commit
1c08ca0e2d
1 changed files with 7 additions and 3 deletions
|
@ -660,9 +660,13 @@ void LauncherController::requestInstallCancel(QUrl aircraftUri)
|
|||
|
||||
void LauncherController::requestUpdateAllAircraft()
|
||||
{
|
||||
const PackageList& toBeUpdated = globals->packageRoot()->packagesNeedingUpdate();
|
||||
std::for_each(toBeUpdated.begin(), toBeUpdated.end(), [](PackageRef pkg) {
|
||||
globals->packageRoot()->scheduleToUpdate(pkg->install());
|
||||
const auto pkgRoot = globals->packageRoot();
|
||||
const PackageList& toBeUpdated = pkgRoot->packagesNeedingUpdate();
|
||||
std::for_each(toBeUpdated.begin(), toBeUpdated.end(), [pkgRoot](PackageRef pkg) {
|
||||
const auto ins = pkg->install();
|
||||
if (!pkgRoot->isInstallQueued(ins)) {
|
||||
pkgRoot->scheduleToUpdate(ins);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue