From a372cc94f3c9b5ec031c3f5869acb0c0963d000c Mon Sep 17 00:00:00 2001 From: 3dtours Date: Wed, 7 Oct 2026 21:29:19 +0700 Subject: [PATCH] fix(library): fix folder context menu lookup and ready check --- docker/frontend/src/Library.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/frontend/src/Library.tsx b/docker/frontend/src/Library.tsx index b871282..d668a4f 100644 --- a/docker/frontend/src/Library.tsx +++ b/docker/frontend/src/Library.tsx @@ -1637,7 +1637,8 @@ function Catalogue() { }} > {rows.map((n) => { - const folder = folders.find((f) => f.name === n.key.split('/')[0]) ?? null; + const rootKey = n.key.split('/')[0]; + const folder = folders.find((f) => (f.name || '').replace(/\\/g, '/') === rootKey || f.name === rootKey) ?? null; // The row that says a reading is under way is the folder the // reading stands in — not the folder it was pointed at, which // would be the same row for the whole of an afternoon while @@ -2108,7 +2109,7 @@ function Catalogue() { ) : null} {menu.folder ? ( - ready.has(menu.folder.name) ? ( + (ready.has(menu.folder.name) || ready.has((menu.folder.name || '').replace(/\\/g, '/'))) ? ( <> {!menu.root ? (