chore(quick_edit): bring back coloring

This commit is contained in:
Elian Doran
2025-11-22 20:08:37 +02:00
parent 2f440eba37
commit 8001d940eb
3 changed files with 49 additions and 117 deletions

View File

@@ -265,11 +265,20 @@ export function useNoteContext() {
const [ isReadOnlyTemporarilyDisabled, setIsReadOnlyTemporarilyDisabled ] = useState<boolean | null | undefined>(noteContext?.viewScope?.isReadOnly);
const [ refreshCounter, setRefreshCounter ] = useState(0);
useEffect(() => {
if (!noteContextContext) return;
setNoteContext(noteContextContext);
setNote(noteContextContext.note);
setNotePath(noteContextContext.notePath);
setViewScope(noteContextContext.viewScope);
}, [ noteContextContext ]);
useEffect(() => {
setNote(noteContext?.note);
}, [ notePath ]);
useTriliumEvents([ "setNoteContext", "activeContextChanged", "noteSwitchedAndActivated", "noteSwitched" ], ({ noteContext }) => {
if (noteContextContext) return;
setNoteContext(noteContext);
setNotePath(noteContext.notePath);
setViewScope(noteContext.viewScope);