MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / removeFolderIcons

Function removeFolderIcons

apps/desktop/src/main/vault.ts:1017–1030  ·  view source on GitHub ↗
(
  folderIcons: Record<string, FolderIconId>,
  folder: NoteFolder,
  subpath: string
)

Source from the content-addressed store, hash-verified

1015}
1016
1017function removeFolderIcons(
1018 folderIcons: Record<string, FolderIconId>,
1019 folder: NoteFolder,
1020 subpath: string
1021): Record<string, FolderIconId> {
1022 const next: Record<string, FolderIconId> = {}
1023 const exactKey = folderIconKey(folder, subpath)
1024 const prefix = `${exactKey}/`
1025 for (const [key, value] of Object.entries(folderIcons)) {
1026 if (key === exactKey || key.startsWith(prefix)) continue
1027 next[key] = value
1028 }
1029 return next
1030}
1031
1032function rewriteFolderColorsForRename(
1033 folderColors: Record<string, FolderColorId>,

Callers 1

deleteFolderFunction · 0.70

Calls 1

folderIconKeyFunction · 0.70

Tested by

no test coverage detected