(from, to)
| 479 | persistViewFolders(view, next); |
| 480 | }, |
| 481 | moveFolder(from, to) { |
| 482 | const fromPath = ensureFolderPath(view, from); |
| 483 | const toPath = ensureFolderPath(view, to); |
| 484 | const current = useSheetContextStore.getState().viewStates[view].folders; |
| 485 | const next = current.map((path) => { |
| 486 | if (path === fromPath) return toPath; |
| 487 | if (isSubFolder({ parent: fromPath, path, dig: true })) { |
| 488 | return path.replace(fromPath, toPath); |
| 489 | } |
| 490 | return path; |
| 491 | }); |
| 492 | const deduped = sortBy([...new Set(next)]); |
| 493 | useSheetContextStore.getState().setViewFolders(view, deduped); |
| 494 | persistViewFolders(view, deduped); |
| 495 | }, |
| 496 | mergeFolders(paths) { |
| 497 | const current = useSheetContextStore.getState().viewStates[view].folders; |
| 498 | const set = new Set(current); |
nothing calls this directly
no test coverage detected