fix(client): quick search in vertical layout

This commit is contained in:
Elian Doran 2024-11-23 00:29:28 +02:00
parent 13e33549c1
commit 0f7b96f096
No known key found for this signature in database

View File

@ -61,8 +61,13 @@ export default class LauncherWidget extends BasicWidget {
}
if (!this.innerWidget) {
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);
if (this.isHorizontalLayout && this.innerWidget.settings) {
@ -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}"`);
}