From cb2ef78c0a76bbb3ad608f444e3653baeaefe952 Mon Sep 17 00:00:00 2001 From: Akos Kitta Date: Wed, 7 Apr 2021 11:58:18 +0200 Subject: [PATCH] ATL-1195: Show all libraries if no board selected. Like for the examples, we show all libraries if no board is selected, or the platform for the selected board is not installed. Otherwise, we show the libs for the current board. Signed-off-by: Akos Kitta --- .../src/browser/contributions/include-library.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arduino-ide-extension/src/browser/contributions/include-library.ts b/arduino-ide-extension/src/browser/contributions/include-library.ts index df42e3f5..01264594 100644 --- a/arduino-ide-extension/src/browser/contributions/include-library.ts +++ b/arduino-ide-extension/src/browser/contributions/include-library.ts @@ -74,10 +74,9 @@ export class IncludeLibrary extends SketchContribution { this.mainMenuManager.update(); const libraries: LibraryPackage[] = [] const fqbn = this.boardsServiceClient.boardsConfig.selectedBoard?.fqbn; - // Do not show board specific examples, when no board is selected. - if (fqbn) { - libraries.push(...await this.libraryService.list({ fqbn })); - } + // Show all libraries, when no board is selected. + // Otherwise, show libraries only for the selected board. + libraries.push(...await this.libraryService.list({ fqbn })); const includeLibMenuPath = [...ArduinoMenus.SKETCH__UTILS_GROUP, '0_include']; // `Add .ZIP Library...`