From 0a0707434e8447456e49b1b7270b4889dd529ad7 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 18 Jan 2025 18:49:36 +0200 Subject: [PATCH] feat(mobile): allow resetting launch bar config --- src/becca/entities/bnote.ts | 4 +++- src/services/special_notes.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/becca/entities/bnote.ts b/src/becca/entities/bnote.ts index acc432127..b0edd8c61 100644 --- a/src/becca/entities/bnote.ts +++ b/src/becca/entities/bnote.ts @@ -1528,7 +1528,9 @@ class BNote extends AbstractBeccaEntity { } isLaunchBarConfig() { - return this.type === "launcher" || ["_lbRoot", "_lbAvailableLaunchers", "_lbVisibleLaunchers"].includes(this.noteId); + return this.type === "launcher" + || ["_lbRoot", "_lbAvailableLaunchers", "_lbVisibleLaunchers"].includes(this.noteId) + || ["_lbMobileRoot", "_lbMobileAvailableLaunchers", "_lbMobileVisibleLaunchers"].includes(this.noteId); } isOptions() { diff --git a/src/services/special_notes.ts b/src/services/special_notes.ts index 81df0250f..2c5b2cf4f 100644 --- a/src/services/special_notes.ts +++ b/src/services/special_notes.ts @@ -213,7 +213,7 @@ function resetLauncher(noteId: string) { if (note?.isLaunchBarConfig()) { if (note) { - if (noteId === "_lbRoot") { + if (noteId === "_lbRoot" || noteId === "_lbMobileRoot") { // deleting hoisted notes are not allowed, so we just reset the children for (const childNote of note.getChildNotes()) { childNote.deleteNote();