fix(library): fix folder context menu lookup and ready check

This commit is contained in:
2026-10-07 21:29:19 +07:00
parent 03bc5eb2be
commit a372cc94f3
+3 -2
View File
@@ -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() {
</button>
) : null}
{menu.folder ? (
ready.has(menu.folder.name) ? (
(ready.has(menu.folder.name) || ready.has((menu.folder.name || '').replace(/\\/g, '/'))) ? (
<>
{!menu.root ? (
<button