From 96c492ff63e2bde9ecf5be7d682082b4fdb0d9ca Mon Sep 17 00:00:00 2001 From: Dominik Mayer Date: Mon, 20 Jan 2025 13:28:56 +0700 Subject: [PATCH] Only show divider if both notes with and without ID are shown --- main.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.ts b/main.ts index 6d67601..0687cad 100644 --- a/main.ts +++ b/main.ts @@ -145,12 +145,12 @@ class IDSidePanelView extends ItemView { leaf.openFile(note.file); }); } - - if (showNotesWithoutID) { - // Add a divider + + if (notesWithID.length > 0 && showNotesWithoutID && notesWithoutID.length > 0) { container.createEl('hr'); - - // Create a container for notes without IDs + } + + if (showNotesWithoutID) { const listElWithoutID = container.createEl('div'); for (const note of notesWithoutID) { const listItem = listElWithoutID.createEl('div');