diff --git a/docker/frontend/src/Library.tsx b/docker/frontend/src/Library.tsx index fbfad40..1b597df 100644 --- a/docker/frontend/src/Library.tsx +++ b/docker/frontend/src/Library.tsx @@ -82,7 +82,11 @@ const NODE_KEY = 'recipescam.library.node'; const FRAME_KEY = 'recipescam.library.frame'; const COLUMN_KEY = 'recipescam.library.column'; const OPEN_KEY = 'recipescam.library.open'; -const DEEP_KEY = 'recipescam.library.deep'; +// The name moved with the default: subfolders used to be drawn unless the reader +// shut them out, and the chip wrote that first answer down on the very first +// visit — so the old key holds 'true' for every reader who never touched it, and +// reading it would keep them on a default they never chose. +const DEEP_KEY = 'recipescam.library.deep2'; const VIEW_KEY = 'recipescam.library.view'; const SORT_BY_KEY = 'recipescam.library.sortBy'; const SORT_DIR_KEY = 'recipescam.library.sortDir'; @@ -327,10 +331,12 @@ function Catalogue() { return set; }); // Whether the strip draws the whole branch under the open node or only the - // node itself. Deep is how a roll reads — its top level holds no file of its - // own — and shallow is what a folder of folders is for. The reader's answer is - // picked up where the last visit left it, the same as the open node above. - const [deep, setDeep] = useState(() => recall(DEEP_KEY) !== 'false'); + // node itself. The node the reader picked is what the screen shows: the frames + // in the folders under it are asked for, not assumed. A roll whose top level + // holds date folders then reads as those folders, and the frames behind them + // arrive when the reader says so. The answer is picked up where the last visit + // left it, the same as the open node above. + const [deep, setDeep] = useState(() => recall(DEEP_KEY) === 'true'); // The frame that is up in the open node — raised by a click on its thumbnail, // and picked up where the last visit left it, so a reader who leaves for the // studio comes back to the negative they were looking at rather than to the @@ -1086,9 +1092,8 @@ function Catalogue() { setNode(nodes.find((n) => n.key === node.split('/')[0])?.key ?? nodes[0]?.key ?? null); }, [loaded, node, nodes]); - // What the open node draws: its own frames, and — unless the branch has been - // shut out of the strip — the ones in every subfolder under it, because a - // roll's top level usually holds no file of its own. + // What the open node draws: its own frames, and — when the reader has asked + // for the branch — the ones in every subfolder under it. const shown = useMemo(() => { if (!rootName) return photos; const normRoot = rootName.replace(/\\/g, '/');