( folderIcons: Record<string, FolderIconId>, folder: NoteFolder, subpath: string )
| 1015 | } |
| 1016 | |
| 1017 | function 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 | |
| 1032 | function rewriteFolderColorsForRename( |
| 1033 | folderColors: Record<string, FolderColorId>, |
no test coverage detected