From 1ad96b73386519f1d9b29aa979a864d5294d7e7b Mon Sep 17 00:00:00 2001 From: xu zhang Date: Wed, 28 Feb 2024 13:25:25 +0800 Subject: [PATCH] lnote-1.1.4 --- package.json | 2 +- web/main.ts | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 0017f18d..460766c9 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "lnote", "displayName": "lnote", "description": "A simple note-taking extension.", - "version": "1.1.3", + "version": "1.1.4", "icon": "icon.png", "publisher": "shinhwagk", "preview": true, diff --git a/web/main.ts b/web/main.ts index ca44dbc5..bf0bf15a 100644 --- a/web/main.ts +++ b/web/main.ts @@ -552,19 +552,19 @@ function processNotes() { for (const n of gs.notes) { gs.allNotes.set(n.id, n) n.als.forEach(n => gs.allArrayLabels.add(n)); - for (const label of n.als) { - const [g] = label.split(jointMark); - if (gs.allGroupLabels.has(g)) { - gs.allGroupLabels.get(g)?.add(label); - } else { - gs.allGroupLabels.set(g, new Set([label])); - } - } + } + gs.allArrayLabels = new Set([...gs.allArrayLabels].sort()) + for (const label of gs.allArrayLabels) { + const [g] = label.split(jointMark); + if (gs.allGroupLabels.has(g)) { + gs.allGroupLabels.get(g)?.add(label); + } else { + gs.allGroupLabels.set(g, new Set([label])); + } } - // child 哪些不在father中的 // const intersections = (array1:string[], array2:string[]) => array1.filter((e) => array2.indexOf(e) !== -1);