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);