From 0f7b96f09698a399d3fa0c53103f81589fd223c6 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 23 Nov 2024 00:29:28 +0200 Subject: [PATCH] fix(client): quick search in vertical layout --- src/public/app/widgets/containers/launcher.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/public/app/widgets/containers/launcher.js b/src/public/app/widgets/containers/launcher.js index 03c24c630..d8971ecd2 100644 --- a/src/public/app/widgets/containers/launcher.js +++ b/src/public/app/widgets/containers/launcher.js @@ -61,7 +61,12 @@ export default class LauncherWidget extends BasicWidget { } if (!this.innerWidget) { - throw new Error(`Unknown initialization error for note '${note.noteId}', title '${note.title}'`); + if (launcherType === "builtinWidget") { + // This allows filtering of builtin widgets based on the layout (horizontal / vertical) + return false; + } else { + throw new Error(`Unknown initialization error for note '${note.noteId}', title '${note.title}'`); + } } this.child(this.innerWidget); @@ -113,7 +118,7 @@ export default class LauncherWidget extends BasicWidget { case "todayInJournal": return new TodayLauncher(note); case "quickSearch": - return new QuickSearchWidget(); + return this.isHorizontalLayout ? new QuickSearchWidget() : null; default: throw new Error(`Unrecognized builtin widget ${builtinWidget} for launcher ${note.noteId} "${note.title}"`); }