File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
frontend/viewer/src/project/browse Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1616 import {XButton } from ' $lib/components/ui/button' ;
1717 import type {IEntry } from ' $lib/dotnet-types' ;
1818 import {EntryPersistence } from ' $lib/entry-editor/entry-persistence.svelte' ;
19+ import {useProjectEventBus } from ' $lib/services/event-bus' ;
1920
2021 const viewSettings = useViewSettings ();
2122 const writingSystemService = useWritingSystemService ();
23+ const eventBus = useProjectEventBus ();
2224 const miniLcmApi = useMiniLcmApi ();
2325 const {
2426 entryId,
3638 return miniLcmApi .getEntry (id );
3739 },
3840 );
41+ eventBus .onEntryUpdated ((e ) => {
42+ if (e .id === entryId ) {
43+ entryResource .refetch ();
44+ }
45+ });
3946 const entry = $derived (entryResource .current ?? undefined );
4047 const headword = $derived ((entry && writingSystemService .headword (entry )) || $t ` Untitled ` );
4148 const loadingDebounced = new Debounced (() => entryResource .loading , 50 );
You can’t perform that action at this time.
0 commit comments