refactor(client): use common method for checking if launch bar config

This commit is contained in:
Elian Doran
2025-01-04 21:52:41 +02:00
parent cfeb4eb51f
commit c2315a9341
5 changed files with 16 additions and 5 deletions

View File

@@ -392,7 +392,8 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
autoExpandMS: 600,
preventLazyParents: false,
dragStart: (node, data) => {
if (['root', '_hidden', '_lbRoot', '_lbAvailableLaunchers', '_lbVisibleLaunchers', "_lbMobileRoot", "_lbMobileAvailableLaunchers", "_lbMobileVisibleLaunchers" ].includes(node.data.noteId)
if (node.data.noteId === "root"
|| utils.isLaunchBarConfig(node.data.noteId)
|| node.data.noteId.startsWith("_options")) {
return false;
}