( folderColors: Record<string, FolderColorId>, folder: NoteFolder, subpath: string )
| 1053 | } |
| 1054 | |
| 1055 | function removeFolderColors( |
| 1056 | folderColors: Record<string, FolderColorId>, |
| 1057 | folder: NoteFolder, |
| 1058 | subpath: string |
| 1059 | ): Record<string, FolderColorId> { |
| 1060 | const next: Record<string, FolderColorId> = {} |
| 1061 | const exactKey = folderIconKey(folder, subpath) |
| 1062 | const prefix = `${exactKey}/` |
| 1063 | for (const [key, value] of Object.entries(folderColors)) { |
| 1064 | if (key === exactKey || key.startsWith(prefix)) continue |
| 1065 | next[key] = value |
| 1066 | } |
| 1067 | return next |
| 1068 | } |
| 1069 | |
| 1070 | function duplicateFolderIcons( |
| 1071 | folderIcons: Record<string, FolderIconId>, |
no test coverage detected