fix(library): fix folder context menu lookup and ready check
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user