Update library dependency installation dialog response indexes

Arduino libraries may specify dependencies on other libraries in their metadata. The installation of these dependencies
is offered by the Arduino IDE when the user installs the dependent library using the Library Manager widget.

The order of the buttons in the dialog that offers the dependencies installation was recently rearranged. The dialog
response interpretation code was not updated to reflect the changes to the button indexes at that time. This caused the
"CANCEL" button to trigger the behavior expected from the "INSTALL ALL" button, and vice versa.

The library dependencies installation dialog response interpretation code is hereby updated to use the new button
indexes.
This commit is contained in:
per1234 2022-10-02 04:55:27 -07:00
parent 40807db65e
commit ae76432944

View File

@ -139,12 +139,12 @@ export class LibraryListWidget extends ListWidget<
if (result) { if (result) {
const { response } = result; const { response } = result;
if (response === 0) { if (response === 1) {
// All
installDependencies = true;
} else if (response === 1) {
// Current only // Current only
installDependencies = false; installDependencies = false;
} else if (response === 2) {
// All
installDependencies = true;
} }
} }
} else { } else {