Aktualisiere den Ablagebaum nach dem Lösen eines Vorgangs aus einer Akte.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
07e46c77f1
commit
1d3c938def
2 files changed
+19
-4
No files matched your search
@@ -80,6 +80,17 @@ export function LibraryLayout() {
|
||||
}
|
||||
}, [outlines]);
|
||||
|
||||
// After a change elsewhere (a matter detached): fetch the lists and every outline held in memory again.
|
||||
const held = useRef(outlines);
|
||||
held.current = outlines;
|
||||
const refreshAll = useCallback(() => {
|
||||
reload();
|
||||
for (const key of held.current.keys()) {
|
||||
const [kind, id, contextId] = key.split(":");
|
||||
loadOutline(kind, id, contextId, true);
|
||||
}
|
||||
}, [reload, loadOutline]);
|
||||
|
||||
// The open entry changed (a chapter added, a matter moved): fetch its outline and the lists again.
|
||||
const stamp = focus?.stamp || "";
|
||||
useEffect(() => {
|
||||
@@ -157,6 +168,7 @@ export function LibraryLayout() {
|
||||
const value = {
|
||||
...data,
|
||||
reload,
|
||||
refreshAll,
|
||||
notify,
|
||||
share,
|
||||
unshare,
|
||||
|
||||
Reference in new issue
Block a user