mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 07:09:54 +01:00
chore(quick_edit): bring back coloring
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user